Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INTERNAL] LocatorResourcePool: pass through constructor arguments #509

Merged
merged 2 commits into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/lbt/resources/LocatorResourcePool.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ const LocatorResource = require("./LocatorResource");


class LocatorResourcePool extends ResourcePool {
constructor() {
super();
constructor(parameters) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK you can also just completely remove the constructor.

Copy link
Contributor Author

@tobiasso85 tobiasso85 Aug 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kk (y) that's even better, I give it a try e5f88ac

super(parameters);
}

prepare(resources) {
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");
});