Skip to content

Commit

Permalink
Update dev-dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed May 10, 2021
1 parent f660b18 commit 2f3214b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
28 changes: 7 additions & 21 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,30 +99,18 @@ if (is(element, isElement)) {
}

/* Should support object tests. */
expectType<boolean>(
is<Heading>(heading, {type: 'heading', depth: 2})
)
expectType<boolean>(
is<Heading>(element, {type: 'heading', depth: 2})
)
expectError(
is<Heading>(heading, {type: 'heading', depth: '2'})
)
expectType<boolean>(is<Heading>(heading, {type: 'heading', depth: 2}))
expectType<boolean>(is<Heading>(element, {type: 'heading', depth: 2}))
expectError(is<Heading>(heading, {type: 'heading', depth: '2'}))

if (is<Heading>(heading, {type: 'heading', depth: 2})) {
expectType<Heading>(heading)
expectNotType<Element>(heading)
}

expectType<boolean>(
is<Element>(element, {type: 'element', tagName: 'section'})
)
expectType<boolean>(
is<Element>(heading, {type: 'element', tagName: 'section'})
)
expectError(
is<Element>(element, {type: 'element', tagName: true})
)
expectType<boolean>(is<Element>(element, {type: 'element', tagName: 'section'}))
expectType<boolean>(is<Element>(heading, {type: 'element', tagName: 'section'}))
expectError(is<Element>(element, {type: 'element', tagName: true}))

if (is<Element>(element, {type: 'element', tagName: 'section'})) {
expectType<Element>(element)
Expand Down Expand Up @@ -181,9 +169,7 @@ unified().use(() => (tree) => {
convert<Heading>('heading')
expectError(convert<Heading>('element'))
convert<Heading>({type: 'heading', depth: 2})
expectError(
convert<Element>({type: 'heading', depth: 2})
)
expectError(convert<Element>({type: 'heading', depth: 2}))
convert<Heading>(isHeading)
expectError(convert<Element>(isHeading))
convert()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"type-coverage": "^2.0.0",
"typescript": "^4.0.0",
"unified": "^9.0.0",
"xo": "^0.38.0"
"xo": "^0.39.0"
},
"scripts": {
"prepack": "npm run build && npm run format",
Expand Down

0 comments on commit 2f3214b

Please sign in to comment.