specifier: ^4.5.0
version: 4.5.0(vite@5.0.2)(vue@3.3.8)
vite:
- specifier: ^5.0.1
+ specifier: ^5.0.2
version: 5.0.2(@types/node@18.18.10)
template/config/cypress:
ts-node:
specifier: ^10.9.1
version: 10.9.1(@types/node@18.18.10)(typescript@5.2.2)
- wait-on:
- specifier: ^7.2.0
- version: 7.2.0(debug@4.3.4)
template/config/nightwatch-ct:
dependencies:
vue:
specifier: ^3.3.8
version: 3.3.8(typescript@5.2.2)
+ devDependencies:
+ '@vue/test-utils':
+ specifier: ^2.4.2
+ version: 2.4.2(vue@3.3.8)
template/config/pinia:
dependencies:
#!/usr/bin/env zx
import 'zx/globals'
-// Vitest would otherwise enable watch mode by default.
-process.env.CI = '1'
-
const playgroundDir = path.resolve(__dirname, '../playground/')
let projects = fs
.readdirSync(playgroundDir, { withFileTypes: true })
cd(path.resolve(playgroundDir, projectName))
const packageJSON = require(path.resolve(playgroundDir, projectName, 'package.json'))
- console.log(`Building ${projectName}`)
+ console.log(`
+
+#####
+Building ${projectName}
+#####
+
+ `)
await $`pnpm build`
if ('@playwright/test' in packageJSON.devDependencies) {
if ('test:unit' in packageJSON.scripts) {
console.log(`Running unit tests in ${projectName}`)
- await $`pnpm test:unit`
+ if (projectName.includes('vitest') || projectName.includes('with-tests')) {
+ // Vitest would otherwise enable watch mode by default.
+ await $`CI=1 pnpm test:unit`
+ } else {
+ await $`pnpm test:unit`
+ }
+ }
+
+ if ('type-check' in packageJSON.scripts) {
+ console.log(`Running type-check in ${projectName}`)
+ await $`pnpm type-check`
}
}
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.0",
- "vite": "^5.0.1"
+ "vite": "^5.0.2"
}
}
{
"scripts": {
- "test:unit": "nightwatch src/components/**/__tests__/*"
+ "test:unit": "nightwatch src/**/__tests__/*"
},
"dependencies": {
"vue": "^3.3.8"
+ },
+ "devDependencies": {
+ "@vue/test-utils": "^2.4.2"
}
}
plugins: ['@nightwatch/vue'],
// See https://nightwatchjs.org/guide/concepts/test-globals.html#external-test-globals
- globals_path: 'nightwatch/globals.js',
+ globals_path: '',
vite_dev_server: {
- start_vite: false
+ start_vite: true,
+ port: process.env.CI ? 4173 : 5173
},
webdriver: {},
+++ /dev/null
-const waitOn = require('wait-on')
-const { setup, teardown } = require('@nightwatch/vue')
-
-const serverPort = process.env.CI ? '4173' : '5173'
-
-module.exports = {
- before(done) {
- setup()
- waitOn({
- resources: [`http-get://localhost:${serverPort}`],
- verbose: true,
- headers: {
- accept: 'text/html'
- }
- }).then(() => {
- done()
- })
- },
-
- after() {
- teardown()
- }
-}
{
"scripts": {
- "test:e2e": "nightwatch tests/e2e"
+ "test:e2e": "nightwatch tests/e2e/*"
},
"devDependencies": {
"nightwatch": "^3.3.2",
"@types/nightwatch": "^2.3.28",
"geckodriver": "^4.2.1",
"chromedriver": "^119.0.0",
- "ts-node": "^10.9.1",
- "wait-on": "^7.2.0"
+ "ts-node": "^10.9.1"
}
}
})
it('visits the app root url', function () {
- browser.assert
- .textContains('.green', 'You did it!')
- .assert.elementHasCount('.wrapper nav a', 2)
- .strictClick('.wrapper nav a:last-child')
+ browser.assert.textContains('.green', 'You did it!')
})
after((browser) => browser.end())
"compilerOptions": {
"target": "ESNext",
"module": "commonjs",
+ "moduleResolution": "node",
"composite": true,
"rootDir": "../",
"lib": ["ESNext", "dom"],
},
"include": ["../node_modules/@nightwatch/**/*", "../src/components/**/*", "../tests/e2e/**/*"],
"ts-node": {
- "files": true
+ "transpileOnly": true
},
"files": ["nightwatch.d.ts"]
}
-export const FILES_TO_FILTER = [
- 'nightwatch.e2e.conf.js',
- 'nightwatch.component.conf.js',
- 'globals.js'
-]
+export const FILES_TO_FILTER = ['nightwatch.e2e.conf.js', 'nightwatch.component.conf.js']