Skip to content
Permalink
9bfb9ba527
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Robert Brignull replace jest with ava
Latest commit 0347b72 May 4, 2020 History
0 contributors

Users who have contributed to this file

32 lines (25 sloc) 737 Bytes
'use strict'
const constants = require('../constants')
const formatUtils = require('../formatUtils')
const lineBuilder = require('../lineBuilder')
const DEEP_EQUAL = constants.DEEP_EQUAL
const UNEQUAL = constants.UNEQUAL
function describe () {
return new NullValue()
}
exports.describe = describe
exports.deserialize = describe
const tag = Symbol('NullValue')
exports.tag = tag
class NullValue {
compare (expected) {
return expected.tag === tag
? DEEP_EQUAL
: UNEQUAL
}
formatDeep (theme) {
return lineBuilder.single(formatUtils.wrap(theme.null, 'null'))
}
}
Object.defineProperty(NullValue.prototype, 'isPrimitive', { value: true })
Object.defineProperty(NullValue.prototype, 'tag', { value: tag })