diff --git a/packages/playwright/package.json b/packages/playwright/package.json index bb7a886f5e..2082b9f61e 100644 --- a/packages/playwright/package.json +++ b/packages/playwright/package.json @@ -42,8 +42,8 @@ "scripts": { "prebuild": "rimraf dist", "build": "tsup src/index.ts --dts --format esm,cjs", - "test": "mocha --timeout 60000 -r ts-node/register 'tests/**.spec.ts'", - "test:esm": "node esmTest.mjs", + "test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'", + "test:esm": "node test/esmTest.mjs", "coverage": "nyc npm run test", "prepare": "npm run build" }, diff --git a/packages/playwright/tests/axe-playwright.spec.ts b/packages/playwright/test/axe-playwright.spec.ts similarity index 100% rename from packages/playwright/tests/axe-playwright.spec.ts rename to packages/playwright/test/axe-playwright.spec.ts diff --git a/packages/playwright/esmTest.mjs b/packages/playwright/test/esmTest.mjs similarity index 75% rename from packages/playwright/esmTest.mjs rename to packages/playwright/test/esmTest.mjs index 88773e6df5..33890de027 100644 --- a/packages/playwright/esmTest.mjs +++ b/packages/playwright/test/esmTest.mjs @@ -1,4 +1,4 @@ -import defaultExport from './dist/index.mjs'; +import defaultExport from '../dist/index.mjs'; import assert from 'assert'; const exportIsFunction = typeof(defaultExport) === 'function'; diff --git a/packages/playwright/tests/fixtures/context.html b/packages/playwright/test/fixtures/context.html similarity index 100% rename from packages/playwright/tests/fixtures/context.html rename to packages/playwright/test/fixtures/context.html diff --git a/packages/playwright/tests/fixtures/external b/packages/playwright/test/fixtures/external similarity index 100% rename from packages/playwright/tests/fixtures/external rename to packages/playwright/test/fixtures/external diff --git a/packages/puppeteer/package.json b/packages/puppeteer/package.json index ac624ccec9..cb1a2fae27 100644 --- a/packages/puppeteer/package.json +++ b/packages/puppeteer/package.json @@ -24,8 +24,8 @@ }, "scripts": { "build": "tsup src/index.ts --dts --format esm,cjs", - "test": "mocha 'test/**/*.test.ts'", - "test:esm": "node esmTest.mjs", + "test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'", + "test:esm": "node test/esmTest.mjs", "coverage": "nyc npm run test", "prepublishOnly": "npm run build" }, diff --git a/packages/puppeteer/test/axePuppeteer.test.ts b/packages/puppeteer/test/axe-puppeteer.spec.ts similarity index 100% rename from packages/puppeteer/test/axePuppeteer.test.ts rename to packages/puppeteer/test/axe-puppeteer.spec.ts diff --git a/packages/puppeteer/esmTest.mjs b/packages/puppeteer/test/esmTest.mjs similarity index 87% rename from packages/puppeteer/esmTest.mjs rename to packages/puppeteer/test/esmTest.mjs index 05cbe935cd..860a52addc 100644 --- a/packages/puppeteer/esmTest.mjs +++ b/packages/puppeteer/test/esmTest.mjs @@ -1,4 +1,4 @@ -import defaultExport, { AxePuppeteer } from './dist/index.mjs'; +import defaultExport, { AxePuppeteer } from '../dist/index.mjs'; import assert from 'assert'; import puppeteer from 'puppeteer'; import { fileURLToPath, pathToFileURL } from 'url'; @@ -20,7 +20,7 @@ if (process.env.CI) { async function integrationTest() { let path = fileURLToPath(new URL('.', import.meta.url)); - path = join(path, './node_modules/axe-test-fixtures/fixtures/index.html'); + path = join(path, '../node_modules/axe-test-fixtures/fixtures/index.html'); const browser = await puppeteer.launch(options); const page = await browser.newPage(); diff --git a/packages/puppeteer/test/integration/doc-dylang.test.ts b/packages/puppeteer/test/integration/doc-dylang.spec.ts similarity index 100% rename from packages/puppeteer/test/integration/doc-dylang.test.ts rename to packages/puppeteer/test/integration/doc-dylang.spec.ts diff --git a/packages/puppeteer/test/load-page.test.ts b/packages/puppeteer/test/load-page.spec.ts similarity index 100% rename from packages/puppeteer/test/load-page.test.ts rename to packages/puppeteer/test/load-page.spec.ts diff --git a/packages/webdriverio/package.json b/packages/webdriverio/package.json index 03244ff5bf..42bf47a284 100644 --- a/packages/webdriverio/package.json +++ b/packages/webdriverio/package.json @@ -28,8 +28,8 @@ "scripts": { "prebuild": "rimraf dist", "build": "tsup src/index.ts --dts --format esm,cjs", - "test": "mocha --timeout 60000 -r ts-node/register 'src/test.ts'", - "test:esm": "node esmTest.mjs", + "test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'", + "test:esm": "node test/esmTest.mjs", "coverage": "nyc npm run test", "prepare": "npm run build" }, diff --git a/packages/webdriverio/src/test.ts b/packages/webdriverio/test/axe-webdriverio.spec.ts similarity index 99% rename from packages/webdriverio/src/test.ts rename to packages/webdriverio/test/axe-webdriverio.spec.ts index 47aa3a2cde..66e99eb49b 100644 --- a/packages/webdriverio/src/test.ts +++ b/packages/webdriverio/test/axe-webdriverio.spec.ts @@ -8,8 +8,8 @@ import { Server, createServer } from 'http'; import net from 'net'; import fs from 'fs'; import delay from 'delay'; -import AxeBuilder from '.'; -import { logOrRethrowError } from './utils'; +import AxeBuilder from '../src'; +import { logOrRethrowError } from '../src/utils'; import type { AxeResults, Result } from 'axe-core'; import child_process from 'child_process'; import { ChildProcessWithoutNullStreams } from 'child_process'; @@ -67,7 +67,7 @@ describe('@axe-core/webdriverio', () => { }); } - describe('WebdriverIO Async', () => { + describe(`WebdriverIO Async (${protocol} protocol)`, () => { let server: Server; let addr: string; let client: webdriverio.Browser; diff --git a/packages/webdriverio/esmTest.mjs b/packages/webdriverio/test/esmTest.mjs similarity index 87% rename from packages/webdriverio/esmTest.mjs rename to packages/webdriverio/test/esmTest.mjs index 9921a2d7cc..5021e83f18 100644 --- a/packages/webdriverio/esmTest.mjs +++ b/packages/webdriverio/test/esmTest.mjs @@ -1,4 +1,4 @@ -import defaultExport from './dist/index.mjs'; +import defaultExport from '../dist/index.mjs'; import assert from 'assert'; import * as webdriverio from 'webdriverio'; import { fileURLToPath, pathToFileURL } from 'url'; @@ -10,7 +10,7 @@ assert(exportIsFunction, 'export is not a function'); async function integrationTest() { let path = fileURLToPath(new URL('.', import.meta.url)); - path = join(path, './node_modules/axe-test-fixtures/fixtures/index.html'); + path = join(path, '../node_modules/axe-test-fixtures/fixtures/index.html'); const options = { automationProtocol: 'devtools', diff --git a/packages/webdriverjs/package.json b/packages/webdriverjs/package.json index 9a38dbef17..536187c304 100644 --- a/packages/webdriverjs/package.json +++ b/packages/webdriverjs/package.json @@ -48,8 +48,8 @@ "scripts": { "prebuild": "rimraf dist", "build": "tsup src/index.ts --dts --format esm,cjs", - "test": "mocha --timeout 10000 -r ts-node/register './tests/**/*.spec.ts'", - "test:esm": "node esmTest.mjs", + "test": "mocha --timeout 60000 -r ts-node/register 'test/**.spec.ts'", + "test:esm": "node test/esmTest.mjs", "coverage": "nyc npm run test", "prepare": "npm run build" }, diff --git a/packages/webdriverjs/tests/axe-webdriverjs.spec.ts b/packages/webdriverjs/test/axe-webdriverjs.spec.ts similarity index 100% rename from packages/webdriverjs/tests/axe-webdriverjs.spec.ts rename to packages/webdriverjs/test/axe-webdriverjs.spec.ts diff --git a/packages/webdriverjs/esmTest.mjs b/packages/webdriverjs/test/esmTest.mjs similarity index 75% rename from packages/webdriverjs/esmTest.mjs rename to packages/webdriverjs/test/esmTest.mjs index 88773e6df5..33890de027 100644 --- a/packages/webdriverjs/esmTest.mjs +++ b/packages/webdriverjs/test/esmTest.mjs @@ -1,4 +1,4 @@ -import defaultExport from './dist/index.mjs'; +import defaultExport from '../dist/index.mjs'; import assert from 'assert'; const exportIsFunction = typeof(defaultExport) === 'function'; diff --git a/packages/webdriverjs/tests/fixtures/context.html b/packages/webdriverjs/test/fixtures/context.html similarity index 100% rename from packages/webdriverjs/tests/fixtures/context.html rename to packages/webdriverjs/test/fixtures/context.html diff --git a/packages/webdriverjs/tests/fixtures/external b/packages/webdriverjs/test/fixtures/external similarity index 100% rename from packages/webdriverjs/tests/fixtures/external rename to packages/webdriverjs/test/fixtures/external diff --git a/packages/webdriverjs/tests/fixtures/iframe-one.html b/packages/webdriverjs/test/fixtures/iframe-one.html similarity index 100% rename from packages/webdriverjs/tests/fixtures/iframe-one.html rename to packages/webdriverjs/test/fixtures/iframe-one.html diff --git a/packages/webdriverjs/tests/test-utils.ts b/packages/webdriverjs/test/test-utils.ts similarity index 100% rename from packages/webdriverjs/tests/test-utils.ts rename to packages/webdriverjs/test/test-utils.ts