mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-28 00:17:12 +01:00
parent
4e45ae6b53
commit
636270b54e
@ -14,9 +14,12 @@ test('should require custom logger to implement info', t => {
|
||||
error: () => {},
|
||||
};
|
||||
const provider = () => loggerImpl;
|
||||
const error = t.throws(() => {
|
||||
const error = t.throws(
|
||||
() => {
|
||||
logger.setLoggerProvider(provider)();
|
||||
}, TypeError);
|
||||
},
|
||||
{ instanceOf: TypeError }
|
||||
);
|
||||
t.is(error.message, 'Logger must implement info');
|
||||
});
|
||||
|
||||
@ -27,8 +30,11 @@ test('should require custom logger to implement error', t => {
|
||||
info: () => {},
|
||||
};
|
||||
const provider = () => loggerImpl;
|
||||
const error = t.throws(() => {
|
||||
const error = t.throws(
|
||||
() => {
|
||||
logger.setLoggerProvider(provider)();
|
||||
}, TypeError);
|
||||
},
|
||||
{ instanceOf: TypeError }
|
||||
);
|
||||
t.is(error.message, 'Logger must implement error');
|
||||
});
|
||||
|
@ -14,9 +14,12 @@ test('should create user', t => {
|
||||
});
|
||||
|
||||
test('should require email', t => {
|
||||
const error = t.throws(() => {
|
||||
const error = t.throws(
|
||||
() => {
|
||||
const user = new User(); // eslint-disable-line
|
||||
}, Error);
|
||||
},
|
||||
{ instanceOf: Error }
|
||||
);
|
||||
|
||||
t.is(error.message, 'Email "value" is required');
|
||||
});
|
||||
|
@ -56,9 +56,9 @@
|
||||
]
|
||||
},
|
||||
"ava": {
|
||||
"helpers": [
|
||||
"**/helpers/**/*",
|
||||
"**/fixtures/**/*"
|
||||
"files": [
|
||||
"!**/helpers/**/*",
|
||||
"!**/fixtures/**/*"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
@ -93,7 +93,7 @@
|
||||
"@passport-next/passport": "^3.1.0",
|
||||
"@passport-next/passport-google-oauth2": "^1.0.0",
|
||||
"@types/node": "^13.7.4",
|
||||
"ava": "^2.4.0",
|
||||
"ava": "^3.7.0",
|
||||
"coveralls": "^3.0.6",
|
||||
"eslint": "^6.5.1",
|
||||
"eslint-config-finn": "^3.0.1",
|
||||
|
Loading…
Reference in New Issue
Block a user