Test migration to jest by hand

Apparently using regular expressions is way easier.
This commit is contained in:
Angelos Chalaris
2018-06-18 15:15:56 +03:00
parent 977949ca61
commit 4f7da1be9b
894 changed files with 5917 additions and 3607 deletions

View File

@ -0,0 +1,16 @@
const expect = require('expect');
const functions = require('./functions.js');
test('functions is a Function', () => {
expect(functions).toBeInstanceOf(Function);
});
function Foo() {
this.a = () => 1;
this.b = () => 2;
}
Foo.prototype.c = () => 3;
t.deepEqual(functions(new Foo()), ['a', 'b'], 'Returns own methods');
t.deepEqual(functions(new Foo(), true), ['a', 'b', 'c'], 'Returns own and inherited methods');