Skip to content

Commit d67e6cf

Browse files
committed
Fix tests
1 parent e7a61c9 commit d67e6cf

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

jest.config.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ module.exports = {
55
'!**/*.d.ts',
66
'!**/index.ts'
77
],
8+
// Adding this because "Cannot use namespace '...' as a type."
9+
globals: {
10+
'ts-jest': {
11+
diagnostics: {
12+
warnOnly: true
13+
}
14+
}
15+
},
816
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
917
rootDir: '.',
1018
transform: {
11-
'^.+\\.tsx?$': 'ts-jest'
19+
'^.+\\.(ts|tsx)$': 'ts-jest'
1220
},
1321
testRegex: 'spec\\.(ts|tsx)$'
1422
};

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"build": "lerna exec yarn build --stream",
2222
"lint": "tslint 'packages/**/*.ts'",
2323
"postinstall": "yarn build",
24-
"test": "jest && lerna exec --package api yarn test",
24+
"test": "jest",
25+
"test:api": "lerna exec --package api yarn test",
2526
"update-docs": "scripts/update-docs.sh"
2627
},
2728
"devDependencies": {
@@ -34,6 +35,6 @@
3435
"tslint-config-semistandard": "^7.0.0",
3536
"typedoc": "^0.12.0",
3637
"typedoc-plugin-markdown": "^1.1.13",
37-
"typescript": "^3.0.1"
38+
"typescript": "^3.1.6"
3839
}
3940
}

packages/contracts/src/registry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default class Registry {
135135

136136
_createGetParams (_name: string, key: string) {
137137
const name = _name.toLowerCase();
138-
const sha3 = this._api.util.sha3.text(name);
138+
const sha3 = this._api.util.sha3Text(name);
139139

140140
return [sha3, key];
141141
}

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"compilerOptions": {
33
"declaration": true,
4+
"jsx": "react",
45
"lib": ["dom", "es2015", "es2017"],
56
"moduleResolution": "node",
67
"strict": true,

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7356,7 +7356,7 @@ [email protected]:
73567356
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.3.tgz#4853b3e275ecdaa27f78fda46dc273a7eb7fc1c8"
73577357
integrity sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==
73587358

7359-
typescript@^3.0.1:
7359+
typescript@^3.1.6:
73607360
version "3.1.6"
73617361
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.1.6.tgz#b6543a83cfc8c2befb3f4c8fba6896f5b0c9be68"
73627362
integrity sha512-tDMYfVtvpb96msS1lDX9MEdHrW4yOuZ4Kdc4Him9oU796XldPYF/t2+uKoX0BBa0hXXwDlqYQbXY5Rzjzc5hBA==

0 commit comments

Comments
 (0)