Skip to content

Commit 94e9aae

Browse files
feat: use type=module in nightwatch projects (#404)
Co-authored-by: Haoqun Jiang <[email protected]>
1 parent e458f5e commit 94e9aae

File tree

7 files changed

+6
-130
lines changed

7 files changed

+6
-130
lines changed

template/config/nightwatch/nightwatch.conf.js renamed to template/config/nightwatch/nightwatch.conf.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ module.exports = {
2121
page_objects_path: [],
2222

2323
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-commands.html
24-
custom_commands_path: ['nightwatch/custom-commands'],
24+
custom_commands_path: [],
2525

2626
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-custom-assertions.html
27-
custom_assertions_path: ['nightwatch/custom-assertions'],
27+
custom_assertions_path: [],
2828

2929
// See https://nightwatchjs.org/guide/extending-nightwatch/adding-plugins.html
3030
plugins: ['@nightwatch/vue'],

template/config/nightwatch/nightwatch/custom-assertions/elementHasCount.js

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

template/config/nightwatch/nightwatch/custom-assertions/elementHasCount.ts

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

template/config/nightwatch/nightwatch/custom-commands/strictClick.js

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

template/config/nightwatch/nightwatch/custom-commands/strictClick.ts

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

template/config/nightwatch/nightwatch/nightwatch.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@ import { NightwatchCustomAssertions, NightwatchCustomCommands } from 'nightwatch
22

33
declare module 'nightwatch' {
44
interface NightwatchCustomAssertions {
5-
elementHasCount: (selector: string, count: number) => NightwatchBrowser
5+
// Add your custom assertions' types here
6+
// elementHasCount: (selector: string, count: number) => NightwatchBrowser
67
}
78

89
interface NightwatchCustomCommands {
9-
strictClick: (selector: string) => NightwatchBrowser
10+
// Add your custom commands' types here
11+
// strictClick: (selector: string) => NightwatchBrowser
1012
}
1113
}

template/config/nightwatch/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"type": "commonjs",
32
"scripts": {
43
"test:e2e": "nightwatch tests/e2e/*"
54
},

0 commit comments

Comments
 (0)