Skip to content

Commit

Permalink
feat: use type=module in nightwatch projects (#404)
Browse files Browse the repository at this point in the history
Co-authored-by: Haoqun Jiang <[email protected]>
  • Loading branch information
cexbrayat and haoqunjiang authored Dec 13, 2023
1 parent e458f5e commit 94e9aae
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 130 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ module.exports = {
page_objects_path: [],

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

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

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

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 4 additions & 2 deletions template/config/nightwatch/nightwatch/nightwatch.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { NightwatchCustomAssertions, NightwatchCustomCommands } from 'nightwatch

declare module 'nightwatch' {
interface NightwatchCustomAssertions {
elementHasCount: (selector: string, count: number) => NightwatchBrowser
// Add your custom assertions' types here
// elementHasCount: (selector: string, count: number) => NightwatchBrowser
}

interface NightwatchCustomCommands {
strictClick: (selector: string) => NightwatchBrowser
// Add your custom commands' types here
// strictClick: (selector: string) => NightwatchBrowser
}
}
1 change: 0 additions & 1 deletion template/config/nightwatch/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"type": "commonjs",
"scripts": {
"test:e2e": "nightwatch tests/e2e/*"
},
Expand Down

0 comments on commit 94e9aae

Please sign in to comment.