Refactor per loader tests
Closed this issue · 0 comments
innoavator commented
For each loader, the test will be of the following format:
it('should return true on canResolve', () => {
const loader = new awsS3Loader();
for (regex in array of regexes) {
// test each regex
}
});
it('should return false on canResolve', () => {
const loader = new awsS3Loader();
for (regex in array of regexes) {
// test each regex
}
});
it('should return required value on resolve', () => {
const loader = new awsS3Loader();
for (regex in map of <regex: return value>) {
check if required value is returned
}
});
it('should throw error on resolve', () => {
const loader = new awsS3Loader();
for (regex in map of <regex: return value>) {
check if error is thrown (check throw message if possible)
}
});