-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(webdriverjs): fix default commonJs export
- Loading branch information
Showing
23 changed files
with
116 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ensure backwards compatibility of commonJs format | ||
const defaultExport = require('../dist/index.js').default; | ||
const { AxeBuilder } = require('../dist/index.js'); | ||
const assert = require('assert'); | ||
|
||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxeBuilder === 'function', 'named export is not a function'); | ||
assert( | ||
defaultExport === AxeBuilder, | ||
'default and named export are not the same' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// ensure compatibility of ESM format | ||
import defaultExport from '../dist/index.mjs'; | ||
import { AxeBuilder } from '../dist/index.mjs'; | ||
import assert from 'assert'; | ||
|
||
const exportIsFunction = typeof defaultExport === 'function'; | ||
assert(exportIsFunction, 'export is not a function'); | ||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxeBuilder === 'function', 'named export is not a function') | ||
assert(defaultExport === AxeBuilder, 'default and named export are not the same'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ensure backwards compatibility of commonJs format | ||
const defaultExport = require('../dist/index.js').default; | ||
const { AxePuppeteer } = require('../dist/index.js'); | ||
const assert = require('assert'); | ||
|
||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxePuppeteer === 'function', 'named export is not a function'); | ||
assert( | ||
defaultExport === AxePuppeteer, | ||
'default and named export are not the same' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// ensure backwards compatibility of commonJs format | ||
global.window = {}; | ||
global.document = {}; | ||
|
||
const defaultExport = require('../dist/index.js'); | ||
const assert = require('assert'); | ||
|
||
assert(typeof defaultExport === 'function', 'export is not a function'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
global.window = {}; | ||
global.document = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// ensure backwards compatibility of commonJs format | ||
const defaultExport = require('../dist/axeReporterEarl.js').default; | ||
const assert = require('assert'); | ||
|
||
const exportIsFunction = typeof defaultExport === 'function'; | ||
assert(exportIsFunction, 'export is not a function'); |
3 changes: 2 additions & 1 deletion
3
packages/reporter-earl/esmTest.mjs → packages/reporter-earl/tests/esmTest.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ensure backwards compatibility of commonJs format | ||
const defaultExport = require('../dist/index.js').default; | ||
const { AxeBuilder } = require('../dist/index.js'); | ||
const assert = require('assert'); | ||
|
||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxeBuilder === 'function', 'named export is not a function'); | ||
assert( | ||
defaultExport === AxeBuilder, | ||
'default and named export are not the same' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ensure backwards compatibility of commonJs format | ||
const defaultExport = require('../dist/index.js'); | ||
const { AxeBuilder } = require('../dist/index.js'); | ||
const assert = require('assert'); | ||
|
||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxeBuilder === 'function', 'named export is not a function'); | ||
assert( | ||
defaultExport === AxeBuilder, | ||
'default and named export are not the same' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
// ensure compatibility of ESM format | ||
import defaultExport from '../dist/index.mjs'; | ||
import { AxeBuilder } from '../dist/index.mjs'; | ||
import assert from 'assert'; | ||
|
||
const exportIsFunction = typeof defaultExport === 'function'; | ||
assert(exportIsFunction, 'export is not a function'); | ||
assert(typeof defaultExport === 'function', 'default export is not a function'); | ||
assert(typeof AxeBuilder === 'function', 'named export is not a function') | ||
assert(defaultExport === AxeBuilder, 'default and named export are not the same'); |