Skip to content

Instantly share code, notes, and snippets.

@sergueyarellano
Created May 26, 2021 14:16
Show Gist options
  • Save sergueyarellano/c90ed2dd000f8144483ee7f6018fbb5f to your computer and use it in GitHub Desktop.
Save sergueyarellano/c90ed2dd000f8144483ee7f6018fbb5f to your computer and use it in GitHub Desktop.
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