Skip to content

Commit c934160

Browse files
committed
feat: update tests
Signed-off-by: Hunter Achieng <achienghunter@gmail.com>
1 parent 6bc9a29 commit c934160

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { _ } from '../src/lodash';
2+
import { expect } from 'chai';
3+
4+
describe('_', () => {
5+
it('should map values', () => {
6+
const mappedValues = _.map([1, 2, 3], n => n * 2);
7+
8+
expect(mappedValues).to.eql([2, 4, 6]);
9+
});
10+
it('should filter values', () => {
11+
const filteredValues = _.filter([1, 2, 3, 4, 5], n => n % 2 === 0);
12+
13+
expect(filteredValues).to.eql([2, 4]);
14+
});
15+
});

packages/common/test/util/index.test.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai';
2-
import { encode, decode, uuid, _ } from '../../src/util';
2+
import { encode, decode, uuid } from '../../src/util';
33

44
describe('uuid', () => {
55
it('should generate a uuid', () => {
@@ -71,15 +71,4 @@ describe('decode', () => {
7171
expect(decode('eyJuYW1lIjoiSmFuZSBEb2UifQ==')).to.eql(obj);
7272
});
7373
});
74-
describe('_', () => {
75-
it('should map values', () => {
76-
const mappedValues = _.map([1, 2, 3], n => n * 2);
7774

78-
expect(mappedValues).to.eql([2, 4, 6]);
79-
});
80-
it('should filter values', () => {
81-
const filteredValues = _.filter([1, 2, 3, 4, 5], n => n % 2 === 0);
82-
83-
expect(filteredValues).to.eql([2, 4]);
84-
});
85-
});

0 commit comments

Comments
 (0)