From 0a9ebb01c27ed0a648922d243e877194977ce4d1 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Wed, 7 Feb 2018 00:18:33 +0000 Subject: Revert "Merge branch 'testing'" This reverts commit 1520a13a7144e6a0569f589d3aa5fdddc8136b8c, reversing changes made to de143da2021f8b972966be36b6bce26245c87e37. --- src/matcher/options.test.ts | 67 --------------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 src/matcher/options.test.ts (limited to 'src/matcher/options.test.ts') diff --git a/src/matcher/options.test.ts b/src/matcher/options.test.ts deleted file mode 100644 index f3d498c..0000000 --- a/src/matcher/options.test.ts +++ /dev/null @@ -1,67 +0,0 @@ -import * as mocha from 'mocha'; -import chai = require('chai'); -var should = chai.should(); - -import * as options from './options'; -import { default as types } from './types'; - -describe('Object Matching:', () => { - describe('Rough Matching', () => { - it('accepts basic things', () => { - let template = { - a: types.string - }; - let matchee = { - a: "yes" - }; - options.match(template, matchee).should.be.true; - }); - it('accepts objects with superfluous properties', () => { - let template = { - a: types.number - }; - let matchee = { - a: 40, - b: 20 - }; - options.match(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.match(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.match(template, matchee).should.be.true; - }); - it('rejects empty objects for non-empty templates', () => { - let template = { - a: types.boolean - }; - let matchee = { - }; - options.match(template, matchee).should.be.false; - }); - it('accepts empty objects for empty templates', () => { - let template = { - }; - let matchee = { - }; - options.match(template, matchee).should.be.true; - }); - }); -}); -- cgit v1.2.1