Created
May 26, 2021 14:16
-
-
Save sergueyarellano/c90ed2dd000f8144483ee7f6018fbb5f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
test('isValidInterface() should take an interface model and an input object and check for type matching', function ({ deepEqual, end }) { | |
const model = { | |
a: 'string', | |
b: 'object', | |
c: 'boolean', | |
d: 'number', | |
e: 'array' | |
} | |
const data = { | |
a: 'foo', | |
b: {}, | |
c: true, | |
d: 2, | |
e: [] | |
} | |
const actual = isValidInterface(data, model) | |
const expected = true | |
deepEqual(actual, expected) | |
end() | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment