use @actions/github

This commit is contained in:
Robert Brignull 2020-07-06 16:04:02 +01:00
parent 9da537eb33
commit 0086c2ecdb
199 changed files with 95598 additions and 6141 deletions

View file

@ -1,4 +1,5 @@
import {TestInterface} from 'ava';
import sinon from 'sinon';
type TestContext = {stdoutWrite: any, stderrWrite: any, testOutput: string};
@ -30,7 +31,7 @@ function wrapOutput(context: TestContext) {
};
}
export function silenceDebugOutput(test: TestInterface<any>) {
export function setupTests(test: TestInterface<any>) {
const typedTest = test as TestInterface<TestContext>;
typedTest.beforeEach(t => {
@ -53,4 +54,8 @@ export function silenceDebugOutput(test: TestInterface<any>) {
process.stdout.write(t.context.testOutput);
}
});
typedTest.afterEach.always(() => {
sinon.restore();
});
}