Skip to content

Commit d332212

Browse files
test: empty from (#343)
1 parent 1f511b8 commit d332212

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/CopyPlugin.test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,20 @@ describe('apply function', () => {
871871
.catch(done);
872872
});
873873

874+
it('warns when pattern is empty', (done) => {
875+
runEmit({
876+
expectedAssetKeys: [],
877+
expectedErrors: [new Error(`path "from" cannot be empty string`)],
878+
patterns: [
879+
{
880+
from: '',
881+
},
882+
],
883+
})
884+
.then(done)
885+
.catch(done);
886+
});
887+
874888
it('can use an absolute path to move a file to the root directory', (done) => {
875889
const absolutePath = path.resolve(HELPER_DIR, 'file.txt');
876890

0 commit comments

Comments
 (0)