Skip to content

Commit

Permalink
Fix tests on next
Browse files Browse the repository at this point in the history
Closes GH-1349.

Reviewed-by: John Otander <[email protected]>
Reviewed-by: Christian Murphy <[email protected]>
  • Loading branch information
wooorm authored Nov 24, 2020
1 parent e7e9d46 commit 9f5a91d
Show file tree
Hide file tree
Showing 23 changed files with 3,821 additions and 2,401 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@
"publish": "lerna publish --force-publish=\"*\"",
"publish-ci": "lerna publish -y --canary --preid ci --pre-dist-tag ci",
"publish-next": "lerna publish --force-publish=\"*\" --pre-dist-tag next --preid next",
"test-only": "lerna run test --no-private",
"test": "yarn build && yarn lint && yarn test-only"
"test-api": "lerna run test-api --no-private",
"test-coverage": "lerna run test-coverage --no-private",
"test-types": "lerna run test-types --no-private",
"test": "yarn build && yarn lint && yarn test-coverage"
},
"dependencies": {},
"devDependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/babel-plugin-apply-mdx-type-props/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
"@babel/helper-plugin-utils": "7.10.4"
},
"scripts": {
"test": "jest test --coverage"
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test": "yarn test-coverage"
},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
4 changes: 3 additions & 1 deletion packages/babel-plugin-extract-export-names/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"@babel/helper-plugin-utils": "7.10.4"
},
"scripts": {
"test": "jest test --coverage"
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test": "yarn test-coverage"
},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
4 changes: 3 additions & 1 deletion packages/babel-plugin-extract-import-names/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@
"@babel/helper-plugin-utils": "7.10.4"
},
"scripts": {
"test": "jest test --coverage"
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test": "yarn test-coverage"
},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
4 changes: 3 additions & 1 deletion packages/babel-plugin-remove-export-keywords/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"babel"
],
"scripts": {
"test": "jest test --coverage"
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test": "yarn test-coverage"
},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
2 changes: 1 addition & 1 deletion packages/gatsby-theme-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"remark-mdx-remove-exports": "^2.0.0-next.8",
"remark-mdx-remove-imports": "^2.0.0-next.8",
"remark-slug": "6.0.0",
"theme-ui": "0.3.1"
"theme-ui": "0.3.4"
},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default ({code, onChange = () => {}, scope = {}, ...props}) => {
css={css({
p: 3,
border: '1px solid',
borderColor: theme.colors.lightgray,
borderColor: '#f6f6f6',
width: '50%'
})}
/>
Expand Down
10 changes: 5 additions & 5 deletions packages/gatsby-theme-mdx/src/components/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, {useEffect, useRef} from 'react'
import {navigate} from 'gatsby'
import {css} from 'theme-ui'
import SearchIcon from './search-icon'
import theme from './theme'

const loadJs = () => import('./docsearch.min.js')

Expand All @@ -18,7 +19,7 @@ const important = styles => {
return next
}

const styles = theme =>
const styles = () =>
important(
css({
display: 'flex',
Expand All @@ -42,7 +43,7 @@ const styles = theme =>
}
}
}
})(theme)
})
)

export default props => {
Expand Down Expand Up @@ -130,8 +131,7 @@ export default props => {
placeholder="Search"
className="docsearch-input"
title="Type `s` to search"
css={theme =>
css({
css={css({
appearance: 'none',
fontSize: 1,
m: 0,
Expand All @@ -147,7 +147,7 @@ export default props => {
outline: 'none',
borderColor: theme.colors.primary
}
})(theme)
})
}
/>
</form>
Expand Down
5 changes: 3 additions & 2 deletions packages/loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
"loader"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"dependencies": {
"@mdx-js/mdx": "^2.0.0-next.8",
Expand Down
7 changes: 5 additions & 2 deletions packages/mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"types": "types/index.d.ts",
"files": [
"index.js",
"util.js",
"mdx-ast-to-mdx-hast.js",
"mdx-hast-to-jsx.js",
"types/index.d.ts"
Expand All @@ -35,14 +36,16 @@
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"dependencies": {
"@babel/core": "7.10.5",
"@babel/plugin-syntax-jsx": "7.10.4",
"@babel/plugin-syntax-object-rest-spread": "7.8.3",
"@mdx-js/util": "2.0.0-next.1",
"babel-plugin-apply-mdx-type-prop": "^2.0.0-next.8",
"babel-plugin-extract-export-names": "^2.0.0-next.8",
"babel-plugin-extract-import-names": "^2.0.0-next.8",
Expand Down
2 changes: 2 additions & 0 deletions packages/mdx/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
console.warn('@mdx-js/util is deprecated: please update the code using it')
module.exports = require('@mdx-js/util')
5 changes: 3 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@
],
"scripts": {
"build": "microbundle -f modern,es,cjs src/index.js",
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"peerDependencies": {
"react": "^16.13.1"
Expand Down
5 changes: 3 additions & 2 deletions packages/remark-mdx-remove-exports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"dependencies": {
"unist-util-remove": "2.0.0"
Expand Down
5 changes: 3 additions & 2 deletions packages/remark-mdx-remove-imports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"dependencies": {
"unist-util-remove": "2.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/remark-mdx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
],
"scripts": {
"format": "remark . -qfo && prettier . --write && xo --fix",
"test": "npm run format && npm run test-coverage",
"test-api": "node test",
"test-coverage": "nyc --reporter lcov tape test/index.js",
"test-types": "dtslint types"
"test-types": "dtslint types",
"test": "yarn format && yarn test-coverage && yarn test-types"
},
"dependencies": {
"parse-entities": "^2.0.0",
Expand Down
3 changes: 3 additions & 0 deletions packages/remark-mdx/test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,9 @@ test('fixtures', function (t) {
}
}

// Windows.
expectedDoc = expectedDoc.replace(/\r\n/g, '\n')

t.deepLooseEqual(tree, expected, input.stem + ' (tree)')
t.deepEqual(doc, expectedDoc, input.stem + ' (doc)')
t.deepEqual(reparsed, treeB, input.stem + ' (re)')
Expand Down
5 changes: 4 additions & 1 deletion packages/remark-mdxjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
"@babel/plugin-syntax-jsx": "7.10.4"
},
"scripts": {
"test": "jest test --coverage"
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "yarn test-coverage"
},
"devDependencies": {
"remark-parse": "^8.0.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"peerDependencies": {
"react": "^16.13.1"
Expand Down
6 changes: 1 addition & 5 deletions packages/test-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@
"remark",
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
},
"scripts": {},
"dependencies": {},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
6 changes: 1 addition & 5 deletions packages/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
"remark",
"mdxast"
],
"scripts": {
"test-api": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
},
"scripts": {},
"gitHead": "bf7deab69996449cb99c2217dff75e65855eb2c1"
}
5 changes: 3 additions & 2 deletions packages/vue-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@
"loader"
],
"scripts": {
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"dependencies": {
"@mdx-js/mdx": "^2.0.0-next.8",
Expand Down
5 changes: 3 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
],
"scripts": {
"build": "microbundle -f modern,es,cjs src",
"test-api": "jest test --coverage",
"test-api": "jest test",
"test-coverage": "jest test --coverage",
"test-types": "dtslint types",
"test": "npm run test-api && npm run test-types"
"test": "yarn test-coverage && yarn test-types"
},
"devDependencies": {
"@vue/test-utils": "^1.1.1",
Expand Down
Loading

0 comments on commit 9f5a91d

Please sign in to comment.