Commit 8dd7a112 authored by Robert Knight's avatar Robert Knight

Fix test failures when arrow functions are not transformed

Native (non-transpiled) arrow functions cannot be used with the `new` operator.
This commit fixes a couple of cases where that was happening.
parent 11542d1f
...@@ -45,7 +45,7 @@ describe('annotator/plugin/pdf', () => { ...@@ -45,7 +45,7 @@ describe('annotator/plugin/pdf', () => {
}; };
$imports.$mock({ $imports.$mock({
'./pdf-metadata': () => fakePDFMetadata, './pdf-metadata': sinon.stub().returns(fakePDFMetadata),
'../anchoring/pdf': fakePdfAnchoring, '../anchoring/pdf': fakePdfAnchoring,
// Disable debouncing of updates. // Disable debouncing of updates.
......
...@@ -66,7 +66,7 @@ describe('Injector', () => { ...@@ -66,7 +66,7 @@ describe('Injector', () => {
container.register('foo', fooFactory); container.register('foo', fooFactory);
container.register('bar', barFactory); container.register('bar', barFactory);
container.register('baz', bazFactory); container.register('baz', { factory: bazFactory });
const baz = container.get('baz'); const baz = container.get('baz');
assert.equal(baz.foo, foo); assert.equal(baz.foo, foo);
......
...@@ -78,7 +78,7 @@ describe('sidebar/services/oauth-auth', function () { ...@@ -78,7 +78,7 @@ describe('sidebar/services/oauth-auth', function () {
authorize: sinon.stub().returns(Promise.resolve(null)), authorize: sinon.stub().returns(Promise.resolve(null)),
}; };
FakeOAuthClient = config => { FakeOAuthClient = function (config) {
fakeClient.config = config; fakeClient.config = config;
return fakeClient; return fakeClient;
}; };
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
dependencies: dependencies:
"@babel/types" "^7.12.1" "@babel/types" "^7.12.1"
"@babel/helper-module-imports@^7.10.4", "@babel/helper-module-imports@^7.12.1": "@babel/helper-module-imports@^7.12.1":
version "7.12.1" version "7.12.1"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz#1644c01591a15a2f084dd6d092d9430eb1d1216c" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.12.1.tgz#1644c01591a15a2f084dd6d092d9430eb1d1216c"
integrity sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA== integrity sha512-ZeC1TlMSvikvJNy1v/wPIazCu3NdOwgYZLIkmIyAsGhqkNpiDoQQRmaCK8YP4Pq3GPTLPV9WXaPCJKvx06JxKA==
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment