Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const expectError = async (key, value) => {
const testData = omit(DATA, key);
if (value !== undefined) {
testData[key] = value;
}
const user = new User(testData);
expect.assertions(1);
try {
await user.validate();
} catch (err) {
expect(err.errors[key]).toBeDefined();
}
};
const expectError = async (key, value) => {
const testData = omit(DATA, key);
if (value !== undefined) {
testData[key] = value;
}
const user = new User(testData);
expect.assertions(1);
try {
await user.validate();
} catch (err) {
expect(err.errors[key]).toBeDefined();
}
};
const expectError = async (key, value) => {
const testData = omit(DATA, key);
if (value !== undefined) {
testData[key] = value;
}
const transaction = new Transaction(testData);
expect.assertions(1);
try {
await transaction.validate();
} catch (err) {
expect(err.errors[key]).toBeDefined();
}
};
const expectError = async (key, value) => {
const testData = omit(DATA, key);
if (value !== undefined) {
testData[key] = value;
}
const transaction = new Transaction(testData);
expect.assertions(1);
try {
await transaction.validate();
} catch (err) {
expect(err.errors[key]).toBeDefined();
}
};
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
var genericIterator = function (obj) {
var entries = objectEntries(obj);
return function iterator() {
return {
next: function () {
return {
done: entries.length === 0,
value: entries.shift()
};
}
};
};
};
render: function() {
var classes = this.getClassSet();
var Component = this.props.component;
var restProps = omit(this.props, Object.keys(this.constructor.propTypes));
classes[this.prefixClass('slash')] = this.props.slash;
return (
{this.props.children}
);
}
});
render: function() {
var restProps = omit(this.props, Object.keys(this.constructor.propTypes));
return (
{this.props.children}
);
}
});
render: function() {
var Component = this.props.component;
var classSet = this.getClassSet();
var restProps = omit(this.props, Object.keys(this.constructor.propTypes));
return (
{this.props.children}
);
}
});