Skip to content

Commit 3156cb5

Browse files
committed
fix unit tests
1 parent 32bca78 commit 3156cb5

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

packages/ember-auto-import/ts/tests/inserter-test.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,22 @@ import { join } from 'path';
1414
import { Inserter } from '../inserter';
1515
import BundleConfig from '../bundle-config';
1616
import { BuildResult, Bundler } from '../bundler';
17+
import Plugin from 'broccoli-plugin';
18+
1719
const { module: Qmodule, test } = QUnit;
1820

21+
class NoopPlugin extends Plugin {
22+
build(): Promise<void> | void {
23+
// noop
24+
}
25+
}
26+
27+
function asInputNode(obj: any) {
28+
const plugin = new NoopPlugin([]);
29+
Object.assign(plugin, obj);
30+
return plugin as Bundler;
31+
}
32+
1933
Qmodule('inserter', function (hooks) {
2034
let builder: Builder;
2135
let upstream: string;
@@ -28,7 +42,7 @@ Qmodule('inserter', function (hooks) {
2842
async function build() {
2943
let inserter = new Inserter(
3044
new UnwatchedDir(upstream),
31-
{ buildResult } as Bundler,
45+
asInputNode({ buildResult }),
3246
bundleConfig,
3347
{
3448
publicAssetURL,

0 commit comments

Comments
 (0)