aboutsummaryrefslogtreecommitdiffstats
path: root/test/schema_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-06-21 19:56:14 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-06-21 19:56:14 +0800
commit40a7be0690c81d2e42543aa075ef8da6606e7b7e (patch)
tree73231f3671133364b53d55074f27e03bd61a1d38 /test/schema_test.ts
parent096d3bdb26921cb3e7d05e65dc286ddf49f98a8a (diff)
downloaddexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.gz
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.bz2
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.lz
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.xz
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.tar.zst
dexon-sol-tools-40a7be0690c81d2e42543aa075ef8da6606e7b7e.zip
Use different lodash import syntax which allows to include only used functions
Diffstat (limited to 'test/schema_test.ts')
-rw-r--r--test/schema_test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/schema_test.ts b/test/schema_test.ts
index b251a68f9..28abdc2c3 100644
--- a/test/schema_test.ts
+++ b/test/schema_test.ts
@@ -1,5 +1,5 @@
import 'mocha';
-import * as _ from 'lodash';
+import forEach from 'lodash/forEach';
import * as chai from 'chai';
import * as BigNumber from 'bignumber.js';
import promisify = require('es6-promisify');
@@ -19,7 +19,7 @@ const expect = chai.expect;
describe('Schema', () => {
const validator = new SchemaValidator();
const validateAgainstSchema = (testCases: any[], schema: any, shouldFail = false) => {
- _.forEach(testCases, (testCase: any) => {
+ forEach(testCases, (testCase: any) => {
if (shouldFail) {
expect(validator.validate(testCase, schema).errors).to.be.lengthOf.at.least(1);
} else {
@@ -285,7 +285,7 @@ describe('Schema', () => {
'00.00': '0',
'.3': '0.3',
};
- _.forEach(testCases, (serialized: string, input: string) => {
+ forEach(testCases, (serialized: string, input: string) => {
expect(JSON.parse(JSON.stringify(new BigNumber(input)))).to.be.equal(serialized);
});
});