Skip to content
Snippets Groups Projects
Commit b2817e9b authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

#20 #21 #22 #23

parent 1b3bdd2f
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
This diff is collapsed.
import {Stack} from "../../../source/types/stack.js";
import {
Monster,
typeOf
} from "../../../source/types/typeof.js"
import {expect} from "chai"
describe('typeOf', function () {
describe('.typeOf()', function () {
[
[true, 'boolean'],
[null, 'null'],
[undefined, 'undefined'],
[Promise.resolve(), 'promise'],
[new WeakMap(), 'weakmap'],
[new Map(), 'map'],
[NaN, 'number'],
[function* () {
}, 'generatorfunction'],
[5, 'number'],
[function () {
}, 'function'],
[/a/, 'regexp'],
[new Date(), 'date'],
[{}, 'object'],
[[], 'array'],
['', 'string'],
[new Error, 'error'],
[new Stack(), 'stack']
].forEach(function (data) {
let a = data.shift()
let b = data.shift()
it('should return ' + b + ' when the value ' + typeOf(a), function () {
expect(typeOf(a)).to.be.equal(b);
});
});
});
});
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
{
"getting-started": {
"title": "Getting Started"
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment