-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from blackflux/dev
[Gally]: master <- dev
- Loading branch information
Showing
6 changed files
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
const align = require('./core/align'); | ||
const contain = require('./core/contain'); | ||
const contains = require('./core/contains'); | ||
const Merge = require('./core/merge'); | ||
|
||
module.exports = { | ||
align, | ||
contain, | ||
contains, | ||
Merge | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
const expect = require('chai').expect; | ||
const contains = require('../../src/core/contains'); | ||
|
||
describe('Testing contains', () => { | ||
it('Testing String', () => { | ||
expect(contains('value1', 'value1')).to.equal(true); | ||
expect(contains('value1', 'value2')).to.equal(false); | ||
}); | ||
|
||
it('Testing List', () => { | ||
expect(contains([1, 2, 3], [1, 2, 3])).to.equal(true); | ||
expect(contains([{ key: 'value1' }], [{ key: 'value1' }])).to.equal(true); | ||
expect(contains([{ key: 'value1' }], [{ key: 'value2' }])).to.equal(false); | ||
expect(contains([1, 2, 3], [3, 2, 1])).to.equal(false); | ||
expect(contains([1, 2, 3], [1, 2])).to.equal(false); | ||
expect(contains([], [])).to.equal(true); | ||
}); | ||
|
||
it('Testing Object', () => { | ||
expect(contains({}, {})).to.equal(true); | ||
expect(contains({ key: 'value1' }, { key: 'value1' })).to.equal(true); | ||
expect(contains({ key: 'value1' }, { key: 'value2' })).to.equal(false); | ||
}); | ||
|
||
it('Testing Type Mismatch', () => { | ||
expect(contains({}, '')).to.equal(false); | ||
expect(contains({}, [])).to.equal(false); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters