mirror of
https://github.com/strapi/strapi.git
synced 2025-06-27 00:41:25 +00:00
17 lines
388 B
JavaScript
17 lines
388 B
JavaScript
![]() |
expect.extend({
|
||
|
stringOrNull(received) {
|
||
|
const pass = typeof received === 'string' || received === null;
|
||
|
if (pass) {
|
||
|
return {
|
||
|
message: () => `expected ${received} not to be null or a string`,
|
||
|
pass: true,
|
||
|
};
|
||
|
} else {
|
||
|
return {
|
||
|
message: () => `expected ${received} to be null or a string`,
|
||
|
pass: false,
|
||
|
};
|
||
|
}
|
||
|
},
|
||
|
});
|