@@ -28,7 +28,7 @@ import plugin from '../src/index.js';
28
28
import { joinLines } from './utils/join-lines' ;
29
29
30
30
describe ( 'rollup-plugin-strip-banner' , ( ) => {
31
- it ( 'should strip banner and generate sourceMap by default ' , ( ) => {
31
+ it ( 'should strip banner and generate sourcemap ' , ( ) => {
32
32
const instance = plugin ( ) ;
33
33
const id = 'test-file.js' ;
34
34
const code = fs . readFileSync ( path . join ( __dirname , 'fixtures' , id ) , 'utf-8' ) ;
@@ -47,44 +47,33 @@ describe('rollup-plugin-strip-banner', () => {
47
47
48
48
it ( 'should ignore source if it is does not have banner' , ( ) => {
49
49
const id = 'test-file-without-banner.js' ;
50
-
51
- const instance = plugin ( {
52
- sourceMap : false ,
53
- } ) ;
54
-
50
+ const instance = plugin ( ) ;
55
51
const code = fs . readFileSync ( path . join ( __dirname , 'fixtures' , id ) , 'utf-8' ) ;
56
-
57
52
const result = instance . transform ( code , id ) ;
58
53
59
54
expect ( result ) . not . toBeDefined ( ) ;
60
55
} ) ;
61
56
62
57
it ( 'should ignore source if it is not included' , ( ) => {
63
58
const id = 'test-file.js' ;
64
-
65
59
const instance = plugin ( {
66
- sourceMap : false ,
67
60
include : '**/*.spec.js' ,
68
61
} ) ;
69
62
70
63
const code = fs . readFileSync ( path . join ( __dirname , 'fixtures' , id ) , 'utf-8' ) ;
71
-
72
64
const result = instance . transform ( code , id ) ;
73
65
74
66
expect ( result ) . not . toBeDefined ( ) ;
75
67
} ) ;
76
68
77
69
it ( 'should ignore source if it is excluded' , ( ) => {
78
70
const id = 'test-file.js' ;
79
-
80
71
const instance = plugin ( {
81
- sourceMap : false ,
82
72
include : '**/*test*.js' ,
83
73
exclude : id ,
84
74
} ) ;
85
75
86
76
const code = fs . readFileSync ( path . join ( __dirname , 'fixtures' , id ) , 'utf-8' ) ;
87
-
88
77
const result = instance . transform ( code , id ) ;
89
78
90
79
expect ( result ) . not . toBeDefined ( ) ;
0 commit comments