lint ✨
This commit is contained in:
parent
f1be92bd41
commit
5173ee8583
|
@ -28,7 +28,8 @@
|
||||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/fileMock.js",
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/internals/mocks/fileMock.js",
|
||||||
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
|
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
|
||||||
"components(.*)$": "<rootDir>/src/components$1",
|
"components(.*)$": "<rootDir>/src/components$1",
|
||||||
"builderStore(.*)$": "<rootDir>/src/builderStore$1"
|
"builderStore(.*)$": "<rootDir>/src/builderStore$1",
|
||||||
|
"constants(.*)$": "<rootDir>/src/constants$1"
|
||||||
},
|
},
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
"js",
|
"js",
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
import "@testing-library/jest-dom/extend-expect"
|
|
||||||
import { render, fireEvent } from "@testing-library/svelte"
|
|
||||||
import CreateEditColumn from "../CreateEditColumn.svelte";
|
|
||||||
|
|
||||||
const testField = {
|
|
||||||
field: {},
|
|
||||||
name: "Yeet"
|
|
||||||
};
|
|
||||||
|
|
||||||
describe("<CreateEditColumn />", () => {
|
|
||||||
|
|
||||||
describe("New Column", () => {
|
|
||||||
it("shows proper heading when rendered", () => {
|
|
||||||
const { getByText } = render(CreateEditColumn, { name: 'World' })
|
|
||||||
|
|
||||||
expect(getByText('Hello World!')).toBeInTheDocument()
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
describe("Edit Existing Column", () => {
|
|
||||||
const { getByText } = render(CreateEditColumn, testField)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
// // Note: This is as an async test as we are using `fireEvent`
|
|
||||||
// test('changes button text on click', async () => {
|
|
||||||
// const { getByText } = render(Comp, { name: 'World' })
|
|
||||||
// const button = getByText('Button')
|
|
||||||
|
|
||||||
// // Using await when firing events is unique to the svelte testing library because
|
|
||||||
// // we have to wait for the next `tick` so that Svelte flushes all pending state changes.
|
|
||||||
// await fireEvent.click(button)
|
|
||||||
|
|
||||||
// expect(button).toHaveTextContent('Button Clicked')
|
|
||||||
// })
|
|
Loading…
Reference in New Issue