Skip to content

Commit 071a6fd

Browse files
authored
test: Format codebase with prettier (#959)
1 parent 68fd459 commit 071a6fd

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.github/workflows/validate.yml

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ jobs:
3838
with:
3939
useLockFile: false
4040

41+
# TODO: Can be removed if https://github.com/kentcdodds/kcd-scripts/pull/146 is released
42+
- name: Verify format (`npm run format` committed?)
43+
run: npm run format -- --check --no-write
44+
4145
# as requested by the React team :)
4246
# https://reactjs.org/blog/2019/10/22/react-release-channels.html#using-the-next-channel-for-integration-testing
4347
- name: ⚛️ Setup react

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"build:bundle:main": "dotenv -e .bundle.main.env kcd-scripts build -- --bundle --no-clean",
1515
"build:bundle:pure": "dotenv -e .bundle.main.env -e .bundle.pure.env kcd-scripts build -- --bundle --no-clean",
1616
"build:main": "kcd-scripts build --no-clean",
17+
"format": "kcd-scripts format",
1718
"lint": "kcd-scripts lint",
1819
"setup": "npm install && npm run validate -s",
1920
"test": "kcd-scripts test",

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {cleanup} from './pure'
55
// this ensures that tests run in isolation from each other
66
// if you don't like this then either import the `pure` module
77
// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.
8-
if (typeof process === "undefined" || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
8+
if (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {
99
// ignore teardown() in code coverage because Jest does not support it
1010
/* istanbul ignore else */
1111
if (typeof afterEach === 'function') {

types/index.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export * from '@testing-library/dom'
1313

1414
export type RenderResult<
1515
Q extends Queries = typeof queries,
16-
Container extends Element | DocumentFragment = HTMLElement
16+
Container extends Element | DocumentFragment = HTMLElement,
1717
> = {
1818
container: Container
1919
baseElement: Element
@@ -32,7 +32,7 @@ export type RenderResult<
3232

3333
export interface RenderOptions<
3434
Q extends Queries = typeof queries,
35-
Container extends Element | DocumentFragment = HTMLElement
35+
Container extends Element | DocumentFragment = HTMLElement,
3636
> {
3737
container?: Container
3838
baseElement?: Element
@@ -48,7 +48,7 @@ type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>
4848
*/
4949
export function render<
5050
Q extends Queries = typeof queries,
51-
Container extends Element | DocumentFragment = HTMLElement
51+
Container extends Element | DocumentFragment = HTMLElement,
5252
>(
5353
ui: React.ReactElement,
5454
options: RenderOptions<Q, Container>,

0 commit comments

Comments
 (0)