@@ -14,13 +14,6 @@ describe("Chunk", () => {
14
14
15
15
it ( "returns a string with modules information" , ( ) => should ( ChunkInstance . toString ( ) ) . be . exactly ( "Chunk[]" ) ) ;
16
16
17
- it ( "should have origins based in constructor information" , ( ) =>
18
- should ( ChunkInstance . origins [ 0 ] ) . be . eql ( {
19
- module : "module-test" ,
20
- loc : "loc-test" ,
21
- name : "chunk-test"
22
- } ) ) ;
23
-
24
17
it ( "should not be the initial instance" , ( ) => should ( ChunkInstance . isInitial ( ) ) . be . false ( ) ) ;
25
18
26
19
describe ( "entry" , ( ) => {
@@ -63,29 +56,6 @@ describe("Chunk", () => {
63
56
} ) ) . be . exactly ( 10 ) ) ;
64
57
} ) ;
65
58
66
- describe ( "checkConstraints" , ( ) => {
67
- it ( "throws an error" , ( ) =>
68
- should ( ( ) => {
69
- ChunkInstance . checkConstraints ( ) ;
70
- } ) . not . throw ( / c h e c k C o n s t r a i n t s / ) ) ;
71
- } ) ;
72
-
73
- describe ( "canBeIntegrated" , ( ) => {
74
- it ( "returns `false` if other object is initial" , ( ) => {
75
- const other = {
76
- isInitial : ( ) => true
77
- } ;
78
- should ( ChunkInstance . canBeIntegrated ( other ) ) . be . false ( ) ;
79
- } ) ;
80
-
81
- it ( "returns `true` if other object and chunk instance are NOT initial" , ( ) => {
82
- const other = {
83
- isInitial : ( ) => false
84
- } ;
85
- should ( ChunkInstance . canBeIntegrated ( other ) ) . be . true ( ) ;
86
- } ) ;
87
- } ) ;
88
-
89
59
describe ( "removeModule" , function ( ) {
90
60
let module ;
91
61
let removeChunkSpy ;
@@ -111,56 +81,4 @@ describe("Chunk", () => {
111
81
} ) ;
112
82
} ) ;
113
83
} ) ;
114
-
115
- describe ( "removeChunk" , function ( ) {
116
- let chunk ;
117
- let removeParentSpy ;
118
- beforeEach ( function ( ) {
119
- removeParentSpy = sinon . spy ( ) ;
120
- chunk = {
121
- removeParent : removeParentSpy
122
- } ;
123
- } ) ;
124
- describe ( "and the chunk does not contain this chunk" , function ( ) {
125
- it ( "returns false" , function ( ) {
126
- ChunkInstance . removeChunk ( chunk ) . should . eql ( false ) ;
127
- } ) ;
128
- } ) ;
129
- describe ( "and the chunk does contain this module" , function ( ) {
130
- beforeEach ( function ( ) {
131
- ChunkInstance . _chunks = new Set ( [ chunk ] ) ;
132
- } ) ;
133
- it ( "calls module.removeChunk with itself and returns true" , function ( ) {
134
- ChunkInstance . removeChunk ( chunk ) . should . eql ( true ) ;
135
- removeParentSpy . callCount . should . eql ( 1 ) ;
136
- removeParentSpy . args [ 0 ] [ 0 ] . should . eql ( ChunkInstance ) ;
137
- } ) ;
138
- } ) ;
139
- } ) ;
140
-
141
- describe ( "removeParent" , function ( ) {
142
- let chunk ;
143
- let removeChunkSpy ;
144
- beforeEach ( function ( ) {
145
- removeChunkSpy = sinon . spy ( ) ;
146
- chunk = {
147
- removeChunk : removeChunkSpy
148
- } ;
149
- } ) ;
150
- describe ( "and the chunk does not contain this chunk" , function ( ) {
151
- it ( "returns false" , function ( ) {
152
- ChunkInstance . removeParent ( chunk ) . should . eql ( false ) ;
153
- } ) ;
154
- } ) ;
155
- describe ( "and the chunk does contain this module" , function ( ) {
156
- beforeEach ( function ( ) {
157
- ChunkInstance . setParents ( [ chunk ] ) ;
158
- } ) ;
159
- it ( "calls module.removeChunk with itself and returns true" , function ( ) {
160
- ChunkInstance . removeParent ( chunk ) . should . eql ( true ) ;
161
- removeChunkSpy . callCount . should . eql ( 1 ) ;
162
- removeChunkSpy . args [ 0 ] [ 0 ] . should . eql ( ChunkInstance ) ;
163
- } ) ;
164
- } ) ;
165
- } ) ;
166
84
} ) ;
0 commit comments