Skip to content

Commit

Permalink
beforeAll fail doesnt prevent test runs jestjs/jest#2713
Browse files Browse the repository at this point in the history
  • Loading branch information
ebemunk committed Sep 25, 2018
1 parent cadf5dd commit d36dcaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
1 change: 1 addition & 0 deletions get-engines.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ curl https://stockfish.s3.amazonaws.com/stockfish-9-linux.zip -o tmp/stockfish-9
unzip tmp/stockfish-9-linux.zip -d tmp/
mkdir engines
mv tmp/stockfish-9-linux/Linux/stockfish-9-64 engines/
ls -lha engines
16 changes: 4 additions & 12 deletions src/__test__/real.test.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
/* eslint-disable no-console */

//testing with real engines
import { Engine } from '../'

const enginePath = 'engines/stockfish-9-64x'
const enginePath = 'engines/stockfish-9-64'

describe('real engine', () => {
const engine = new Engine(enginePath)

beforeEach(async () => {
await engine.init()
})

afterEach(async () => {
await engine.quit()
})

describe('promise/async', () => {
it('promise/async usage', async () => {
const engine = new Engine(enginePath)
await engine.init()
expect(engine.options).toMatchSnapshot()
await engine.setoption('MultiPV', '4')
expect(engine.options).toMatchSnapshot()
const go = await engine.go({ depth: 4 })
expect(go).toBeDefined()
await engine.quit()
})

xit('goinfinite usage', async () => {
Expand Down

0 comments on commit d36dcaf

Please sign in to comment.