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

Diff for: template/config/nightwatch/nightwatch.conf.js renamed to template/config/nightwatch/nightwatch.conf.cjs

+2-2
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'],

Diff for: template/config/nightwatch/nightwatch/custom-assertions/elementHasCount.js

-45
This file was deleted.

Diff for: template/config/nightwatch/nightwatch/custom-assertions/elementHasCount.ts

-43
This file was deleted.

Diff for: template/config/nightwatch/nightwatch/custom-commands/strictClick.js

-19
This file was deleted.

Diff for: template/config/nightwatch/nightwatch/custom-commands/strictClick.ts

-18
This file was deleted.

Diff for: template/config/nightwatch/nightwatch/nightwatch.d.ts

+4-2
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
}

Diff for: template/config/nightwatch/package.json

-1
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)