mirror of https://github.com/Kylart/KawAnime.git
[wip] Trying to fix travis
This commit is contained in:
parent
2d7797b329
commit
46ee86b43e
|
@ -6,7 +6,7 @@ import { readFileSync } from 'fs'
|
|||
import { DIR, makeApp } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test('/getConfig.json route exits and returns json with right keys', async (t) => {
|
||||
const { body: data } = await request(makeApp())
|
||||
|
|
|
@ -4,7 +4,7 @@ import request from 'supertest'
|
|||
import { makeApp } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test('/_env route exits and return string containing platform\'s name', async (t) => {
|
||||
const { body, status } = await request(makeApp()).get('/_env')
|
||||
|
|
|
@ -5,7 +5,7 @@ import { join } from 'path'
|
|||
import { makeApp, DIR } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test('/getHistory route exits and returns history file', async (t) => {
|
||||
const { body, status } = await request(makeApp()).get('/getHistory')
|
||||
|
|
|
@ -14,7 +14,7 @@ import clean from '../clean.js'
|
|||
|
||||
import { makeApp, kawAnimeFilesPath } from './utils.js'
|
||||
|
||||
test.afterEach.always('Cleaning...', clean)
|
||||
test.afterEach.always.cb('Cleaning', clean)
|
||||
|
||||
test('KawAnime\'s needed files are generated if not there.', async (t) => {
|
||||
t.plan(5)
|
||||
|
|
|
@ -6,7 +6,7 @@ import { join } from 'path'
|
|||
import { makeApp, DIR } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test.before((t) => {
|
||||
makeApp()
|
||||
|
|
|
@ -4,7 +4,7 @@ import request from 'supertest'
|
|||
import { makeApp } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test.skip('/getWatchList route exits and return an array containing entries', async t => {
|
||||
const { body, status } = await request(makeApp())
|
||||
|
|
|
@ -4,7 +4,7 @@ import request from 'supertest'
|
|||
import { makeApp } from './utils.js'
|
||||
import clean from '../clean.js'
|
||||
|
||||
test.after('Cleaning', clean)
|
||||
test.after.cb('Cleaning', clean)
|
||||
|
||||
test.beforeEach.cb((t) => {
|
||||
setTimeout(t.end, 5 * 1000)
|
||||
|
|
|
@ -4,6 +4,6 @@ import test from 'ava'
|
|||
// import { makeApp } from './utils.js'
|
||||
// import clean from '../clean.js'
|
||||
|
||||
// test.after('Cleaning', clean)
|
||||
// test.after.cb('Cleaning', clean)
|
||||
|
||||
test.todo('Make tests?')
|
||||
|
|
|
@ -6,7 +6,7 @@ import { join } from 'path'
|
|||
import clean from '../clean.js'
|
||||
import { makeApp, kawAnimeFilesPath } from './utils.js'
|
||||
|
||||
test.afterEach.always(clean)
|
||||
test.afterEach.always.cb('Cleaning', clean)
|
||||
|
||||
test('/_setupCreds route exits and creates a bcup file along the master key which are retrievable', async (t) => {
|
||||
t.plan(3)
|
||||
|
|
|
@ -5,10 +5,11 @@ const chalk = require('chalk')
|
|||
|
||||
const DIR = join(homedir(), '.KawAnime-test')
|
||||
|
||||
module.exports = () => {
|
||||
module.exports = (cb) => {
|
||||
rimraf(DIR, (err) => {
|
||||
if (err) throw err
|
||||
|
||||
console.log(chalk.green('> Cleared testing directory.'))
|
||||
cb && cb.end()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue