Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

Commit

Permalink
fix(test): update ava to 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
freaktechnik committed Jan 29, 2019
1 parent 6aa179c commit c9d65db
Show file tree
Hide file tree
Showing 32 changed files with 926 additions and 1,024 deletions.
1,874 changes: 888 additions & 986 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@types/knex": "0.15.1",
"@types/koa-router": "^7.0.31",
"@types/node": "^10.12.17",
"ava": "^1.0.0-beta.6",
"ava": "^1.2.0",
"commitizen": "^3.0.2",
"cz-conventional-changelog": "^2.1.0",
"gulp": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/lib/log/outputs/console.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests console out logging. End to End testing due to mocks of the console
*/

import { Macro, test as baseTest, TestInterface } from 'ava'
import baseTest, { Macro, TestInterface } from 'ava'
import { stub } from 'sinon'

import { create } from '../../../../utility/app'
Expand All @@ -28,7 +28,7 @@ interface IContext {

const test = baseTest as TestInterface<IContext>

const testOutput: Macro<IContext> = (t, input: Level, fn: string, expected: string) => {
const testOutput: Macro<[Level, string, string], IContext> = (t, input: Level, fn: string, expected: string) => {
const log = new Log(t.context.logger)
.setLevel(input)

Expand All @@ -37,7 +37,7 @@ const testOutput: Macro<IContext> = (t, input: Level, fn: string, expected: stri
t.true(t.context[expected].called)
}

testOutput.title = (_, input: string, fn: string, expected: number) => {
testOutput.title = (_, input: Level, fn: string, expected: string) => {
return `${fn} gets outputted to console ${expected}`
}

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/lib/service/aptly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the Aptly package repository class.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/lib/service/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the GitHub repository class.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/worker/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests docker usage ability
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/worker/task/debian/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests that the changelog task works as needed
*/

import { test } from 'ava'
import test from 'ava'

import { DebianChangelog } from '../../../../../src/worker/task/debian/changelog'

Expand Down
2 changes: 1 addition & 1 deletion test/e2e/worker/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Runs some repositories through tests for end to end testing
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the configuration class
*/

import { test } from 'ava'
import test from 'ava'

import { Config } from '../../../../src/lib/config/index'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/config/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests configuration loading functions.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as path from 'path'

import * as loader from '../../../../src/lib/config/loader'
Expand Down
8 changes: 4 additions & 4 deletions test/spec/lib/log/level.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
* NOTE: Because of typescript enum values, we compare the enum index value
*/

import { Macro, test } from 'ava'
import test, { Macro } from 'ava'

import * as Level from '../../../../src/lib/log/level'

const testParseLevel: Macro = (t, input: string, expected: number) => {
const testParseLevel: Macro<[string, number]> = (t, input: string, expected: number) => {
t.is(Level.parseLevel(input), expected)
}

testParseLevel.title = (_, input: string, expected: number) => {
return `parseLevel ${input} = ${expected}`
}

const testLevelString: Macro = (t, input: number, expected: string) => {
const testLevelString: Macro<[number, string]> = (t, input: number, expected: string) => {
t.is(Level.levelString(input), expected)
}

testLevelString.title = (_, input: string, expected: number) => {
testLevelString.title = (_, input: number, expected: string) => {
return `levelString ${input} = ${expected}`
}

Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/log/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the log class.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import { create } from '../../../utility/app'

import { App } from '../../../../src/app'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/queue/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests out the container system for the queue. I'm sorry am a IoC noob
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'

import { App } from '../../../../src/lib/app'
import { Config } from '../../../../src/lib/config'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/service/aptly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the Aptly class.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as path from 'path'

import { App } from '../../../../src/lib/app'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/lib/service/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the GitHub class.
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as path from 'path'

import { github, IGitHubFactory } from '../../../../src/lib/service'
Expand Down
4 changes: 2 additions & 2 deletions test/spec/lib/utility/eventemitter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests we can do the things we need to do in fun node event like fashion
*/

import { test } from 'ava'
import test from 'ava'

import { EventEmitter } from '../../../../src/lib/utility/eventemitter'

Expand Down Expand Up @@ -36,5 +36,5 @@ test('thrown errors in listeners appear on emitter', async (t) => {
em.on('test', async (v) => (v + 1))
em.on('test', async (v) => { throw err })

await t.throws(em.emitAsyncChain('test', 1), err.message)
await t.throwsAsync(em.emitAsyncChain('test', 1), err.message)
})
2 changes: 1 addition & 1 deletion test/spec/lib/utility/glob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import * as path from 'path'

import { test } from 'ava'
import test from 'ava'

import { glob } from '../../../../src/lib/utility/glob'

Expand Down
4 changes: 2 additions & 2 deletions test/spec/lib/utility/rdnn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
* Tests RDNN functions
*/

import { Macro, test } from 'ava'
import test, { Macro } from 'ava'

import * as rdnn from '../../../../src/lib/utility/rdnn'

const sanitize: Macro = (t, input: string, expected: string) => {
const sanitize: Macro<[string, string]> = (t, input: string, expected: string) => {
t.is(rdnn.sanitize(input), expected)
}

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the worker Log can do log related things :shrug:
*/

import { test } from 'ava'
import test from 'ava'
import * as path from 'path'

import { Log } from '../../../src/worker/log'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/preset/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests that the release preset has all the tasks we need
*/

import { test as baseTest, TestInterface } from 'ava'
import baseTest, { TestInterface } from 'ava'
import * as path from 'path'

import { App } from '../../../../src/lib/app'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the appstream id test
*/

import { test } from 'ava'
import test from 'ava'

import { AppstreamId } from '../../../../../src/worker/task/appstream/id'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests that known good appstream files pass appstream testing
*/

import { test } from 'ava'
import test from 'ava'

import { Appstream } from '../../../../../src/worker/task/appstream/index'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests we can insert markdown changelogs to the appstream file
*/

import { test } from 'ava'
import test from 'ava'
import * as cheerio from 'cheerio'
import * as fs from 'fs-extra'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the appstream screenshot test
*/

import { test } from 'ava'
import test from 'ava'

import { AppstreamScreenshot } from '../../../../../src/worker/task/appstream/screenshot'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/stripe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests inserting stripe keys into appstream file
*/

import { test } from 'ava'
import test from 'ava'
import * as cheerio from 'cheerio'
import * as fs from 'fs-extra'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/appstream/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the validatecli docker test
*/

import { test } from 'ava'
import test from 'ava'
import * as fs from 'fs-extra'

import { AppstreamValidate } from '../../../../../src/worker/task/appstream/validate'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/debian/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests writing debian changelog files
*/

import { test } from 'ava'
import test from 'ava'
import * as fs from 'fs-extra'
import * as os from 'os'
import * as path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/debian/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Testing the tests that test the Debian control file
*/

import { test } from 'ava'
import test from 'ava'

test.todo('Debian control file source error fails build')
test.todo('Debian control file package error fails build')
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/desktop/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests that known good appstream files pass appstream testing
*/

import { test } from 'ava'
import test from 'ava'

import { DesktopIcon } from '../../../../../src/worker/task/desktop/icon'
import { Desktop } from '../../../../../src/worker/task/desktop/index'
Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/desktop/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the desktop-file-validate docker test
*/

import { test } from 'ava'
import test from 'ava'

import { DesktopValidate } from '../../../../../src/worker/task/desktop/validate'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/file/deb/binary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests the deb file binary test
*/

import { test } from 'ava'
import test from 'ava'

import { FileDebBinary } from '../../../../../../src/worker/task/file/deb/binary'

Expand Down
2 changes: 1 addition & 1 deletion test/spec/worker/task/workspace/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Tests building out workspaces
*/

import { test } from 'ava'
import test from 'ava'

import { WorkspaceSetup } from '../../../../../src/worker/task/workspace/setup'

Expand Down

0 comments on commit c9d65db

Please sign in to comment.