Skip to content

Commit c095808

Browse files
committed
check that proper text exists instead of snapshots
1 parent 0b0161e commit c095808

File tree

6 files changed

+10
-38
lines changed

6 files changed

+10
-38
lines changed

__tests__/__snapshots__/build.spec.js.snap

Lines changed: 0 additions & 9 deletions
This file was deleted.

__tests__/__snapshots__/buildTS.spec.js.snap

Lines changed: 0 additions & 9 deletions
This file was deleted.

__tests__/__snapshots__/serve.spec.js.snap

Lines changed: 0 additions & 9 deletions
This file was deleted.

__tests__/__snapshots__/serveTS.spec.js.snap

Lines changed: 0 additions & 9 deletions
This file was deleted.

__tests__/build.helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ const runTests = useTS =>
133133
// Load was successful
134134
expect(await app.webContents.isLoading()).toBe(false)
135135
// App is loaded properly
136-
expect(await client.getHTML('#app')).toMatchSnapshot()
136+
expect(
137+
(await client.getHTML('#app')).indexOf(
138+
`Welcome to Your Vue.js ${useTS ? '+ TypeScript ' : ''}App`
139+
)
140+
).not.toBe(-1)
137141

138142
await app.stop()
139143
resolve()

__tests__/serve.helper.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,11 @@ const runTests = useTS =>
116116
expect(width).toBeGreaterThan(0)
117117
expect(height).toBeGreaterThan(0)
118118
// App is loaded properly
119-
expect(await client.getHTML('#app')).toMatchSnapshot()
119+
expect(
120+
(await client.getHTML('#app')).indexOf(
121+
`Welcome to Your Vue.js ${useTS ? '+ TypeScript ' : ''}App`
122+
)
123+
).not.toBe(-1)
120124

121125
stopServe()
122126
await app.stop()

0 commit comments

Comments
 (0)