tests: added environment test (#3983)
This commit is contained in:
parent
7e272a314f
commit
6c9b7e2a15
2
.github/workflows/test-env.yml
vendored
2
.github/workflows/test-env.yml
vendored
@ -18,7 +18,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
test: [ "ts-import-cjs-node16", "ts-import-esm-node16", "ts-import-cjs", "ts-import-esm" ]
|
||||
test: [ "ts-import-cjs-node16", "ts-import-esm-node16", "ts-import-cjs", "ts-import-esm", "test-3983" ]
|
||||
|
||||
steps:
|
||||
- name: Use Node.js
|
||||
|
2
testcases/test-env/test-3983/.gitignore
vendored
Normal file
2
testcases/test-env/test-3983/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
index.d.ts
|
||||
index.js
|
5
testcases/test-env/test-3983/index.ts
Normal file
5
testcases/test-env/test-3983/index.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { ethers } from "ethers";
|
||||
|
||||
console.log("Version:", ethers.version);
|
||||
|
||||
console.log(ethers.getAddress("0x0123456789abcdef0123456789abcdef01234567"));
|
29
testcases/test-env/test-3983/package.json
Normal file
29
testcases/test-env/test-3983/package.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"name": "test",
|
||||
"dependencies": {
|
||||
"ethers": "^6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
},
|
||||
"version": "0.0.1",
|
||||
"description": "Test case for simple import for ethers.",
|
||||
"main": "index.js",
|
||||
"private": true,
|
||||
"publishConfig": {
|
||||
"access": "private"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "tsc --project tsconfig.json",
|
||||
"clean": "rm -rf node_modules package-lock.json *.js *.d.ts",
|
||||
"postinstall": "find node_modules | grep package.json",
|
||||
"test": "npm run build && node index.js"
|
||||
},
|
||||
"keywords": [
|
||||
"ethers",
|
||||
"tests",
|
||||
"typescipt"
|
||||
],
|
||||
"author": "Richard Moore <me@ricmoo.com>",
|
||||
"license": "MIT"
|
||||
}
|
19
testcases/test-env/test-3983/tsconfig.json
Normal file
19
testcases/test-env/test-3983/tsconfig.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"importHelpers": false,
|
||||
"lib": [
|
||||
"dom",
|
||||
"es2020",
|
||||
"es5"
|
||||
],
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "nodenext",
|
||||
"strict": true,
|
||||
"target": "es2022"
|
||||
},
|
||||
"exclude": [ ],
|
||||
"include": [
|
||||
"./index.ts"
|
||||
],
|
||||
}
|
Loading…
Reference in New Issue
Block a user