Skip to content

Commit

Permalink
Attempt e2e test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nephix committed Feb 19, 2020
1 parent 415929c commit 76ce4e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion raiden-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"start": "npm run contracts && tsc -p src/tsconfig.cjs.json -w",
"build": "npm run contracts && tsc -p src/tsconfig.json && tsc -p src/tsconfig.cjs.json && npm run contracts:post",
"test": "npm run lint && NODE_ENV=development jest --coverage=true",
"test": "npm run lint && NODE_ENV=development jest --coverage=true --runInBand",
"lint": "eslint --max-warnings 0 --ext '.ts' .",
"clean": "rimraf dist/ dist:cjs/ .coverage/ src/contracts/ src/abi/ src/deployment/",
"contracts:pre": "node ./scripts/copyContracts.js prebuild",
Expand Down
14 changes: 7 additions & 7 deletions raiden-ts/tests/e2e/raiden.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,13 @@ describe('Raiden', () => {

// token address not found as an account in provider
await expect(Raiden.create(provider, token, storage, contractsInfo, config)).rejects.toThrow(
/Account.*not found in provider/i,
ErrorCodes.RDN_ACCOUNT_NOT_FOUND,
);

// neither account index, address nor private key
await expect(
Raiden.create(provider, '0x1234', storage, contractsInfo, config),
).rejects.toThrow(/account must be either.*address or private key/i);
).rejects.toThrow(ErrorCodes.RDN_STRING_ACCOUNT_INVALID);

// from hex-encoded private key, initial unknown state (decodable) but invalid address inside
await expect(
Expand Down Expand Up @@ -803,7 +803,7 @@ describe('Raiden', () => {
expect.assertions(2);
raiden.updateConfig({ pfs: null });
await expect(raiden.transfer(token, partner, 201)).rejects.toThrowError(
/no direct route/i,
ErrorCodes.PFS_DISABLED,
);
});

Expand Down Expand Up @@ -1186,18 +1186,18 @@ describe('Raiden', () => {

test('should throw exception on main net', async () => {
expect.assertions(1);
raiden = await Raiden.create(
const rdn = await Raiden.create(
new TestProvider(undefined, { network_id: 1 }),
0,
storage,
contractsInfo,
config,
);
raiden.start();
rdn.start();
await expect(
raiden.mint('0x3a989D97388a39A0B5796306C615d10B7416bE77', 50),
rdn.mint('0x3a989D97388a39A0B5796306C615d10B7416bE77', 50),
).rejects.toThrowError('Minting is only allowed on test networks.');
raiden.stop();
rdn.stop();
});

test('should return transaction if minted successfully', async () => {
Expand Down

0 comments on commit 76ce4e4

Please sign in to comment.