Skip to content

Commit

Permalink
Merge pull request #155 from stencila/themes
Browse files Browse the repository at this point in the history
Fix themes
  • Loading branch information
nokome authored Jul 5, 2019
2 parents 5cd0570 + e31386c commit 4fcf826
Show file tree
Hide file tree
Showing 16 changed files with 282 additions and 1,979 deletions.
149 changes: 57 additions & 92 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions 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 @@ -76,7 +76,7 @@
},
"devDependencies": {
"@stencila/dev-config": "^1.0.5",
"@stencila/typescript-boilerplate": "^1.1.1",
"@stencila/typescript-boilerplate": "^1.1.2",
"@types/async-lock": "^1.1.1",
"@types/escape-html": "0.0.20",
"@types/fs-extra": "^7.0.0",
Expand Down Expand Up @@ -124,6 +124,7 @@
"preset": "ts-jest",
"testEnvironment": "node",
"setupFilesAfterEnv": [
"<rootDir>/src/__tests__/logger.ts",
"<rootDir>/src/__tests__/matchers.ts"
],
"testMatch": [
Expand All @@ -136,6 +137,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
8 changes: 8 additions & 0 deletions src/__tests__/logger.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { replaceHandlers, defaultHandler } from '@stencila/logga'

/**
* Show all log entries except for DEBUG level during tests
*/
replaceHandlers(data => {
if (data.level < 3) defaultHandler(data)
})
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
Loading

0 comments on commit 4fcf826

Please sign in to comment.