Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.then(() => {
// Write data
const wizardData = {
a: 'a',
b: 'b'
};
Harness.testSubmission(form, {
data: wizardData
});
assert.deepStrictEqual(form._seenPages, [0]);
assert.equal(form.page, 0);
})
.then(() => {
it('should return an empty commitlint config object when non-existent config path is given', function () {
assert.deepStrictEqual(Config.get(''), {rules: {}});
});
it('should return the default types if `types` does not exist in given config', function () {
assert.deepStrictEqual(Types.get({}), Types.defaults);
});
it('process the assertion error', () => {
const processedError = processAssertionError({
name: 'foo',
message: 'An error',
expected: { foo: 1 },
actual: { bar: 2 },
showDiff: true
}, kocha.stringify)
assert.deepStrictEqual(processedError, {
name: 'foo',
message: 'An error',
expected: 'Object{foo:1}',
actual: 'Object{bar:2}',
showDiff: true
})
})
})
it('returns a stripped area', () => {
const area = { top: '50px', left: '48.8px' };
assert.deepStrictEqual(utils.strip(area), { top: 50, left: 48.8 });
});
});
function requestEquals(actual, protoComponents) {
protoComponents = Array.prototype.slice.call(arguments, 1);
assert.deepStrictEqual(actual, buildQuery.apply(null, protoComponents));
}
mustCall(() => {
const actual = JSON.parse(data);
const expected = { result: "hoge" };
assert.deepStrictEqual(actual, expected);
})
);
function assertSelected(wrapper: Wrapper, selector: string, value: string | string[]): void {
if (typeof value === 'string') {
value = [value]
}
const select = q(wrapper, selector)
const selected = Array.from(select.options).filter(option => {
return option.selected
}).map(option => {
return option.value
})
assert.deepStrictEqual(selected.sort(), value.sort())
}
mustCall(() => {
const result = JSON.parse(data);
assert.deepStrictEqual(result, ["2017", "2017", "2018"]);
})
);
return Promise.all(promises).then(() => {
assert.deepStrictEqual(actualErrorAttempts, expectedErrorAttempts);
});
});