Skip to content

Commit

Permalink
test: add existSync assertions in content check
Browse files Browse the repository at this point in the history
  • Loading branch information
sanket143 committed Apr 30, 2021
1 parent 8a65b08 commit ac89e9e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/generator.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ test("ignore multiple files of certain extension", async() => {
})

test("content of explicitly added files from common folder is correct", async() => {
expect.assertions(3)
expect.assertions(9)

const s = generator("template", "app", {
variables: {
Expand All @@ -305,4 +305,11 @@ test("content of explicitly added files from common folder is correct", async()
expect(fs.readFileSync("app/scripts/three.js", {
encoding: "utf8",
})).toBe("console.log(\"this is three.js\")")

expect(fs.existsSync("app/scripts/one.ts")).toBe(false)
expect(fs.existsSync("app/scripts/two.ts")).toBe(false)
expect(fs.existsSync("app/scripts/three.ts")).toBe(false)
expect(fs.existsSync("app/scripts/one.mjs")).toBe(false)
expect(fs.existsSync("app/scripts/two.mjs")).toBe(false)
expect(fs.existsSync("app/scripts/three.mjs")).toBe(false)
})

0 comments on commit ac89e9e

Please sign in to comment.