Skip to content

Commit 50bad9a

Browse files
committed
fix tests
1 parent ca9df49 commit 50bad9a

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

__tests__/index-test.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,10 @@ describe('when used with typescript', () => {
405405
Plugin,
406406
]);
407407

408-
expect(actual).toEqual(
409-
`Ember.RSVP.Promise.resolve().then(() => {});\n\nfunction scheduleSave(identifier, options = {}) {}`
410-
);
408+
expect(actual).toMatchInlineSnapshot(`
409+
"Ember.RSVP.Promise.resolve().then(() => {});
410+
function scheduleSave(identifier, options = {}) {}"
411+
`);
411412
});
412413

413414
it(`works when you use an import as both a type and a TSDeclareFunction`, () => {
@@ -490,17 +491,16 @@ export default class MyController extends Controller {
490491
['@babel/plugin-proposal-decorators', { legacy: true }],
491492
]);
492493

493-
expect(actual).toEqual(`var _dec, _class;
494-
495-
function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }
496-
497-
let MyController = (_dec = Ember._action, (_class = class MyController extends Ember.Controller {
498-
addAction(action) {
499-
this.actions.pushObject(action);
500-
}
501-
502-
}, (_applyDecoratedDescriptor(_class.prototype, "addAction", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, "addAction"), _class.prototype)), _class));
503-
export { MyController as default };`);
494+
expect(actual).toMatchInlineSnapshot(`
495+
"var _dec, _class;
496+
function _applyDecoratedDescriptor(i, e, r, n, l) { var a = {}; return Object.keys(n).forEach(function (i) { a[i] = n[i]; }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, (\\"value\\" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { return n(i, e, r) || r; }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; }
497+
let MyController = (_dec = Ember._action, _class = class MyController extends Ember.Controller {
498+
addAction(action) {
499+
this.actions.pushObject(action);
500+
}
501+
}, _applyDecoratedDescriptor(_class.prototype, \\"addAction\\", [_dec], Object.getOwnPropertyDescriptor(_class.prototype, \\"addAction\\"), _class.prototype), _class);
502+
export { MyController as default };"
503+
`);
504504
});
505505
});
506506

0 commit comments

Comments
 (0)