Skip to content

Commit

Permalink
test: Format codebase with prettier (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Sep 11, 2021
1 parent 68fd459 commit 071a6fd
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
with:
useLockFile: false

# TODO: Can be removed if https://github.com/kentcdodds/kcd-scripts/pull/146 is released
- name: Verify format (`npm run format` committed?)
run: npm run format -- --check --no-write

# as requested by the React team :)
# https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing
- name: ⚛️ Setup react
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"build:bundle:main": "dotenv -e .bundle.main.env kcd-scripts build -- --bundle --no-clean",
"build:bundle:pure": "dotenv -e .bundle.main.env -e .bundle.pure.env kcd-scripts build -- --bundle --no-clean",
"build:main": "kcd-scripts build --no-clean",
"format": "kcd-scripts format",
"lint": "kcd-scripts lint",
"setup": "npm install && npm run validate -s",
"test": "kcd-scripts test",
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {cleanup} from './pure'
// this ensures that tests run in isolation from each other
// if you don't like this then either import the `pure` module
// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.
if (typeof process === "undefined" || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
// ignore teardown() in code coverage because Jest does not support it
/* istanbul ignore else */
if (typeof afterEach === 'function') {
Expand Down
6 changes: 3 additions & 3 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export * from '@testing-library/dom'

export type RenderResult<
Q extends Queries = typeof queries,
Container extends Element | DocumentFragment = HTMLElement
Container extends Element | DocumentFragment = HTMLElement,
> = {
container: Container
baseElement: Element
Expand All @@ -32,7 +32,7 @@ export type RenderResult<

export interface RenderOptions<
Q extends Queries = typeof queries,
Container extends Element | DocumentFragment = HTMLElement
Container extends Element | DocumentFragment = HTMLElement,
> {
container?: Container
baseElement?: Element
Expand All @@ -48,7 +48,7 @@ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
*/
export function render<
Q extends Queries = typeof queries,
Container extends Element | DocumentFragment = HTMLElement
Container extends Element | DocumentFragment = HTMLElement,
>(
ui: React.ReactElement,
options: RenderOptions<Q, Container>,
Expand Down

0 comments on commit 071a6fd

Please sign in to comment.