Skip to content

Commit

Permalink
Merge pull request #748 from gemini-testing/feat/rm.runnable.type.pro…
Browse files Browse the repository at this point in the history
…perty

feat: remove runnable type property
  • Loading branch information
j0tunn committed Mar 25, 2023
2 parents 147659d + 8ad298f commit 57c20f3
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 26 deletions.
4 changes: 0 additions & 4 deletions src/test-reader/test-object/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ class Hook extends TestObject {
}).assign(this);
}

get type() {
return "hook";
}

get file() {
return this.parent.file;
}
Expand Down
4 changes: 0 additions & 4 deletions src/test-reader/test-object/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ class Test extends ConfigurableTestObject {
fn: this.fn,
}).assign(this);
}

get type() {
return "test";
}
}

module.exports = {
Expand Down
2 changes: 1 addition & 1 deletion src/worker/runner/test-runner/execution-thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = class ExecutionThread {
let fnPromise = Promise.method(runnable.fn).call(this._ctx, this._ctx);

if (runnable.timeout) {
const msg = `${runnable.type} '${runnable.fullTitle()}' timed out after ${runnable.timeout} ms`;
const msg = `'${runnable.fullTitle()}' timed out after ${runnable.timeout} ms`;
fnPromise = fnPromise.timeout(runnable.timeout, msg);
}

Expand Down
8 changes: 0 additions & 8 deletions test/src/test-reader/test-object/hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,6 @@ describe("test-reader/test-object/hook", () => {
});
});

describe("type", () => {
it('should be "hook"', () => {
const hook = new Hook({});

assert.equal(hook.type, "hook");
});
});

describe("file", () => {
it("should return parent file", () => {
const hook = new Hook({});
Expand Down
8 changes: 0 additions & 8 deletions test/src/test-reader/test-object/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,4 @@ describe("test-reader/test-object/test", () => {
assert.calledOn(Test.prototype.assign, clonedTest);
});
});

describe("type", () => {
it('should be "test"', () => {
const test = new Test({});

assert.equal(test.type, "test");
});
});
});
2 changes: 1 addition & 1 deletion test/src/worker/runner/test-runner/execution-thread.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ describe("worker/runner/test-runner/execution-thread", () => {

const executionThread = mkExecutionThread_();

await assert.isRejected(executionThread.run(runnable), /test 'bla bla' timed out/);
await assert.isRejected(executionThread.run(runnable), /'bla bla' timed out/);
});

it("should not set timeout if timeouts are disabled", async () => {
Expand Down

0 comments on commit 57c20f3

Please sign in to comment.