Skip to content

Commit e4bd686

Browse files
committed
Fix failing source-map tests
This is because source-map library changes it's internal representations.
1 parent b09c6eb commit e4bd686

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

test/source-map.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe('source map test', function () {
6868
});
6969

7070
// contains mapping for identifier
71-
expect(result.map._mappings.some(function (mapping) {
71+
expect(result.map._mappings.toArray().some(function (mapping) {
7272
return mapping.generatedLine == 1 &&
7373
mapping.generatedColumn == 9 &&
7474
mapping.originalLine == 2 &&
@@ -142,9 +142,9 @@ describe('source map test', function () {
142142
}
143143

144144
// found x param mapping
145-
expect(result.map._mappings.filter(isXParam).length).to.be.equal(1);
145+
expect(result.map._mappings.toArray().filter(isXParam).length).to.be.equal(1);
146146
// found y param mapping
147-
expect(result.map._mappings.filter(isYParam).length).to.be.equal(1);
147+
expect(result.map._mappings.toArray().filter(isYParam).length).to.be.equal(1);
148148
});
149149

150150
it('MemberExpression test', function () {
@@ -212,10 +212,10 @@ describe('source map test', function () {
212212
}
213213

214214
// found object mapping
215-
expect(result.map._mappings.filter(isObject).length).to.be.equal(1);
215+
expect(result.map._mappings.toArray().filter(isObject).length).to.be.equal(1);
216216

217217
// found one property mapping
218-
expect(result.map._mappings.filter(isProperty).length).to.be.equal(1);
218+
expect(result.map._mappings.toArray().filter(isProperty).length).to.be.equal(1);
219219
});
220220

221221
it('Declaration in Function test', function () {
@@ -297,7 +297,7 @@ describe('source map test', function () {
297297
});
298298

299299
// "found a declaration node"
300-
expect(result.map._mappings.filter(function (x) {
300+
expect(result.map._mappings.toArray().filter(function (x) {
301301
return x.originalLine == 1 && x.originalColumn == 6;
302302
}).length).to.be.equal(1);
303303
});

0 commit comments

Comments
 (0)