This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace karma with web-test-runner (#133)
* Replace karma with wtr in http-client * Replace karma with wtr in protocol * Add changeset * rebase and update deps * Fix protocol devtool implementation after web5/credentials pkg update * Add glob to build for http-client browser tests * Add glob to build for protocol tests * update deps * Fix tests
- Loading branch information
1 parent
72fa522
commit 550fe94
Showing
14 changed files
with
1,597 additions
and
691 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@tbdex/http-client": patch | ||
"@tbdex/protocol": patch | ||
--- | ||
|
||
Replaces karma testing library with web-test-runner |
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
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,4 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const Buffer = require('buffer/').Buffer | ||
|
||
globalThis.Buffer = Buffer |
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,22 @@ | ||
import { fileURLToPath } from 'node:url' | ||
|
||
import esbuild from 'esbuild' | ||
import path from 'node:path' | ||
import glob from 'tiny-glob' | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
|
||
esbuild.buildSync({ | ||
entryPoints : await glob(`${__dirname}/*.spec.ts`), | ||
format : 'esm', | ||
bundle : true, | ||
sourcemap : true, | ||
platform : 'browser', | ||
target : ['chrome101', 'firefox108', 'safari16'], | ||
outdir : `${__dirname}/compiled`, | ||
define : { | ||
'global': 'globalThis', | ||
}, | ||
inject: [`${__dirname}/buffer-polyfill.cjs`], | ||
}) |
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,28 @@ | ||
import { playwrightLauncher } from '@web/test-runner-playwright' | ||
|
||
/** | ||
* @type {import('@web/test-runner').TestRunnerConfig} | ||
*/ | ||
export default { | ||
files : ['tests/compiled/*.spec.js'], | ||
playwright : true, | ||
nodeResolve : true, | ||
browsers : [ | ||
playwrightLauncher({ | ||
product: 'chromium', | ||
}), | ||
playwrightLauncher({ | ||
product: 'firefox', | ||
}), | ||
playwrightLauncher({ | ||
product: 'webkit', | ||
}), | ||
], | ||
testsFinishTimeout : 300000, | ||
concurrentBrowsers : 2, | ||
testFramework : { | ||
config: { | ||
timeout: '15000', | ||
}, | ||
}, | ||
} |
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
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,21 @@ | ||
import { fileURLToPath } from 'node:url' | ||
|
||
import esbuild from 'esbuild' | ||
import path from 'node:path' | ||
import glob from 'tiny-glob' | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = path.dirname(__filename) | ||
|
||
esbuild.buildSync({ | ||
entryPoints : await glob(`${__dirname}/*.spec.ts`), | ||
format : 'esm', | ||
bundle : true, | ||
sourcemap : true, | ||
platform : 'browser', | ||
target : ['chrome101', 'firefox108', 'safari16'], | ||
outdir : `${__dirname}/compiled`, | ||
define : { | ||
'global': 'globalThis', | ||
} | ||
}) |
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
Oops, something went wrong.