Skip to content

Commit

Permalink
Rename PublicApi to ExecutionContext
Browse files Browse the repository at this point in the history
This matches the terminology used in the README.
  • Loading branch information
novemberborn authored and sindresorhus committed Mar 14, 2017
1 parent 0b11db7 commit 3aeb8b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Object.keys(assert).forEach(el => {
SkipApi.prototype[el] = skipFn;
});

class PublicApi {
class ExecutionContext {
constructor(test) {
this._test = test;
this.skip = new SkipApi(test);
Expand Down Expand Up @@ -98,13 +98,13 @@ function onAssertionEvent(event) {
return ret;
}

Object.assign(PublicApi.prototype, enhanceAssert({
Object.assign(ExecutionContext.prototype, enhanceAssert({
assert,
onSuccess: onAssertionEvent,
onError: onAssertionEvent
}));

Object.defineProperty(PublicApi.prototype, 'context', {enumerable: true});
Object.defineProperty(ExecutionContext.prototype, 'context', {enumerable: true});

class Test {
constructor(title, fn, contextRef, report) {
Expand Down Expand Up @@ -176,7 +176,7 @@ class Test {
let ret;

try {
ret = this.fn(this._publicApi());
ret = this.fn(this._createExecutionContext());
} catch (err) {
this.threwSync = true;

Expand Down Expand Up @@ -355,8 +355,8 @@ class Test {

return this.promise().promise;
}
_publicApi() {
return new PublicApi(this);
_createExecutionContext() {
return new ExecutionContext(this);
}
}

Expand Down

0 comments on commit 3aeb8b0

Please sign in to comment.