Skip to content

Commit

Permalink
[INTERNAL] LocatorResourcePool: pass through constructor arguments (#509
Browse files Browse the repository at this point in the history
)

* [INTERNAL] LocatorResourcePool: pass through constructor arguments

ignoreMissingModules parameter is passed along now when creating
a new LocatorResourcePool
To achieve this constructor is removed
  • Loading branch information
tobiasso85 authored Aug 28, 2020
1 parent 7416a97 commit 6b529f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 0 additions & 5 deletions lib/lbt/resources/LocatorResourcePool.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
const ResourcePool = require("./ResourcePool");
const LocatorResource = require("./LocatorResource");


class LocatorResourcePool extends ResourcePool {
constructor() {
super();
}

prepare(resources) {
resources = resources.filter( (res) => !res.getStatInfo().isDirectory() );
return Promise.all(
Expand Down
8 changes: 8 additions & 0 deletions test/lib/lbt/resources/LocatorResourcePool.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const test = require("ava");
const LocatorResourcePool = require("../../../../lib/lbt/resources/LocatorResourcePool");

test("getIgnoreMissingModules", async (t) => {
const resourcePool = new LocatorResourcePool({ignoreMissingModules: true});
t.true(resourcePool.getIgnoreMissingModules(), "ignoreMissingModules is true");
});

0 comments on commit 6b529f9

Please sign in to comment.