Skip to content

Commit dccfcb7

Browse files
JiaLiPassionalxhub
authored andcommitted
test(zone.js): update zone.js test for jasmine upgrade (#49914)
Update test cases to pass jasmine 6.x update. PR Close #49914
1 parent 84a2e7d commit dccfcb7

File tree

7 files changed

+307
-304
lines changed

7 files changed

+307
-304
lines changed

packages/zone.js/test/browser/MutationObserver.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,18 @@ describe('MutationObserver', ifEnvSupports('MutationObserver', function() {
1515

1616
beforeEach(function() {
1717
elt = document.createElement('div');
18+
document.body.appendChild(elt);
19+
});
20+
21+
afterEach(function() {
22+
document.body.removeChild(elt);
1823
});
1924

2025
it('should run observers within the zone', function(done) {
2126
const testZone = Zone.current.fork({name: 'test'});
2227
let ob;
28+
elt = document.createElement('div');
29+
document.body.appendChild(elt);
2330

2431
testZone.run(function() {
2532
ob = new MutationObserver(function() {

packages/zone.js/test/browser/XMLHttpRequest.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ describe('XMLHttpRequest', function() {
5050
if ((req as any)[zoneSymbol('loadfalse')]) {
5151
expect(logs).toEqual(['onload']);
5252
}
53+
onStable = null;
5354
done();
5455
};
5556

0 commit comments

Comments
 (0)