File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import fsFixtures from './utils/fs-fixtures';
11
11
import FileManagerPlugin from '../lib' ;
12
12
13
13
const fixturesDir = path . resolve ( __dirname , 'fixtures' ) ;
14
- const { existsSync } = fsFixtures ( fixturesDir ) ;
14
+ const { existsSync, writeFile } = fsFixtures ( fixturesDir ) ;
15
15
16
16
test . before ( async ( ) => {
17
17
await del ( '*' , {
@@ -136,6 +136,24 @@ test('should first create destination if it does not exist and copy inside desti
136
136
t . pass ( ) ;
137
137
} ) ;
138
138
139
+ test ( 'should copy a file without extension to target folder' , async ( t ) => {
140
+ await writeFile ( 'testing/file-without-ext' ) ;
141
+
142
+ const config = {
143
+ onEnd : {
144
+ copy : [ { source : 'testing/file-without-ext' , destination : './testing/no-ext/' } ] ,
145
+ } ,
146
+ } ;
147
+
148
+ const compiler = getCompiler ( fixturesDir ) ;
149
+ new FileManagerPlugin ( config ) . apply ( compiler ) ;
150
+ await compile ( compiler ) ;
151
+
152
+ const result = existsSync ( './testing/no-ext/file-without-ext' ) ;
153
+ t . true ( result ) ;
154
+ t . pass ( ) ;
155
+ } ) ;
156
+
139
157
test ( 'should not copy a file that does not exist { source: "/filedoesnotexist.js", destination: "/destFolder" } provided' , async ( t ) => {
140
158
const config = {
141
159
onEnd : {
You can’t perform that action at this time.
0 commit comments