diff options
| author | Tom Harley | 2018-02-07 00:18:33 +0000 |
|---|---|---|
| committer | Tom Harley | 2018-02-07 00:18:33 +0000 |
| commit | 0a9ebb01c27ed0a648922d243e877194977ce4d1 (patch) | |
| tree | e92e80940f110eef905b9e3a69908dab738178e8 /test/options.test.ts | |
| parent | Merge branch 'testing' (diff) | |
| download | medicine-0a9ebb01c27ed0a648922d243e877194977ce4d1.tar.gz medicine-0a9ebb01c27ed0a648922d243e877194977ce4d1.zip | |
Revert “Merge branch ‘testing’”
This reverts commit 1520a13a7144e6a0569f589d3aa5fdddc8136b8c, reversing changes made to de143da2021f8b972966be36b6bce26245c87e37.
Diffstat (limited to 'test/options.test.ts')
| -rw-r--r-- | test/options.test.ts | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/test/options.test.ts b/test/options.test.ts deleted file mode 100644 index 8622c73..0000000 --- a/test/options.test.ts +++ /dev/null @@ -1,52 +0,0 @@ -import * as mocha from 'mocha'; -import chai = require('chai'); -var should = chai.should(); - -import * as options from '../src/matcher/options'; -import { default as types } from '../src/matcher/types'; - -describe('Object Matching:', () => { - describe('Rough Matching', () => { - it('accepts basic things', () => { - let template = { - a: types.string - }; - let matchee = { - a: "yes" - }; - options.rough(template, matchee).should.be.true; - }); - it('accepts objects with superfluous properties', () => { - let template = { - a: types.number - }; - let matchee = { - a: 40, - b: 20 - }; - options.rough(template, matchee).should.be.true; - }); - it('rejects objects missing some properties', () => { - let template = { - a: types.boolean, - b: types.number, - c: types.number - }; - let matchee = { - b: 5 - }; - options.rough(template, matchee).should.be.false; - }); - it('accepts objects that omit not_present properties', () => { - let template = { - a: types.function, - b: types.not_present, - c: types.not_present - }; - let matchee = { - a: new Function() - }; - options.rough(template, matchee).should.be.true; - }); - }); -}); |
