Skip to content

Commit

Permalink
test(Fix): Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nokome committed Jul 3, 2019
1 parent 59f6ad8 commit e31386c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"install": "npx ts-node ./install.ts",
"test": "jest",
"test:cover": "jest --collectCoverage",
"test:watch": "jest --watch",
"test:watch": "jest --watchAll",
"check": "npm run build && npm run check:deps-used && npm run check:deps-unused",
"check:deps-used": "dependency-check --missing .",
"check:deps-unused": "dependency-check --unused --no-dev --ignore-module @stencila/schema --ignore-module @stencila/thema .",
Expand Down Expand Up @@ -133,6 +133,7 @@
"globalTeardown": "<rootDir>/src/__tests__/teardown.ts",
"testPathIgnorePatterns": [
"<rootDir>/dist/",
"__tests__/logger.ts",
"__tests__/matchers.ts",
"__tests__/teardown.ts",
"__tests__/helpers.ts"
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ test('load', async () => {
})

test('dump', async () => {
expect(await dump(simpleThing, { format: 'json' })).toEqual(simpleThingJson)
expect(await dump(simpleThing, 'json')).toEqual(simpleThingJson)
})

describe('read', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/issues/58-list-unordered.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('issue 58', () => {

test('that gdoc converts to the expected md', async () => {
const article = (await read(file)) as stencila.Article
const md = await dump(article, { format: 'md' })
const md = await dump(article, 'md')
expect(md).toBe(`---
title: real converter test
authors: []
Expand Down
4 changes: 1 addition & 3 deletions src/codecs/dmagic/demo-magic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ test('decode', async () => {
})

test('encode', async () => {
expect(
await dump(await encode(node, { codecOptions: { embed: false } }))
).toEqual(bash)
expect(await dump(await encode(node, { isBundle: false }))).toEqual(bash)
expect(await encode(node)).toBeTruthy()
})

Expand Down

0 comments on commit e31386c

Please sign in to comment.