Skip to content

Commit e8a9eb7

Browse files
committed
test: add cypress test for TS
1 parent 0d7e766 commit e8a9eb7

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

packages/@vue/cli-plugin-e2e-cypress/__tests__/cypressPlugin.spec.js

+26
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,29 @@ test('should work', async () => {
2727
await project.run(`vue-cli-service test:e2e --headless`)
2828
}
2929
})
30+
31+
test('should work with TS', async () => {
32+
const project = await create('e2e-cypress-ts', {
33+
plugins: {
34+
'@vue/cli-plugin-typescript': {
35+
'classComponent': true,
36+
'tsLint': true,
37+
'lintOn': ['save']
38+
},
39+
'@vue/cli-plugin-e2e-cypress': {}
40+
}
41+
})
42+
43+
const pkg = JSON.parse(await project.read('package.json'))
44+
expect(pkg.devDependencies).toHaveProperty('@cypress/webpack-preprocessor')
45+
46+
const config = JSON.parse(await project.read('cypress.json'))
47+
config.video = false
48+
await project.write('cypress.json', JSON.stringify(config))
49+
50+
if (!process.env.CI) {
51+
await project.run(`vue-cli-service test:e2e`)
52+
} else if (!process.env.APPVEYOR) {
53+
await project.run(`vue-cli-service test:e2e --headless`)
54+
}
55+
})

0 commit comments

Comments
 (0)