forked from openwallet-foundation/credo-ts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: various improvements (openwallet-foundation#1361)
Signed-off-by: Timo Glastra <timo@animo.id>
- Loading branch information
1 parent
a0a2c1a
commit 076d796
Showing
11 changed files
with
48 additions
and
17 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 |
---|---|---|
@@ -1 +1 @@ | ||
jest.setTimeout(25000) | ||
jest.setTimeout(50000) |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import 'reflect-metadata' | ||
|
||
jest.setTimeout(20000) | ||
jest.setTimeout(50000) |
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,15 @@ | ||
const fs = require('fs') | ||
const path = require('path') | ||
|
||
// Read package.json | ||
const packageJsonPath = path.join(__dirname, '..', 'package.json') | ||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath)) | ||
|
||
// Add ref-napi resolution | ||
packageJson.resolutions = { | ||
...packageJson.resolutions, | ||
'ref-napi': 'npm:@2060.io/ref-napi', | ||
} | ||
|
||
// Write package.json | ||
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2)) |
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,12 @@ | ||
type NodeVersions = 14 | 16 | 17 | 18 | ||
|
||
export function describeRunInNodeVersion(versions: NodeVersions[], ...parameters: Parameters<typeof describe>) { | ||
const runtimeVersion = process.version | ||
const mappedVersions = versions.map((version) => `v${version}.`) | ||
|
||
if (mappedVersions.some((version) => runtimeVersion.startsWith(version))) { | ||
describe(...parameters) | ||
} else { | ||
describe.skip(...parameters) | ||
} | ||
} |