Skip to content

Commit 2b662d1

Browse files
committed
Update import statements
1 parent bc73c6c commit 2b662d1

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

.vscode/markdown.code-snippets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"",
2828
"<!--Native-->",
2929
"```js",
30-
"import { $1 } from 'dom-testing-library'",
30+
"import { $1 } from '@testing-library/dom'",
3131
"",
3232
"const container = document.body",
3333
"const $3 = $1(container, '$2')",
@@ -50,4 +50,4 @@
5050
],
5151
"description": "Create a Docusaurus multi-language code block"
5252
}
53-
}
53+
}

docs/dom-testing-library/api-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Defaults to `data-testid`. See [`getByTestId`](#getbytestid).
2828

2929
```js
3030
// setup-tests.js
31-
import { configure } from 'dom-testing-library'
31+
import { configure } from '@testing-library/dom'
3232

3333
configure({testIdAttribute: 'my-data-test-id'})`
3434
```

docs/dom-testing-library/api-helpers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ to use a different data-attribute. (Note: test files would import
1313

1414
```js
1515
// test-utils.js
16-
const domTestingLib = require('dom-testing-library')
16+
const domTestingLib = require('@testing-library/dom')
1717
const { queryHelpers } = domTestingLib
1818

1919
export const queryByTestId = queryHelpers.queryByAttribute.bind(
@@ -116,7 +116,7 @@ could do:
116116
<!--Native-->
117117

118118
```js
119-
import { within } from 'dom-testing-library'
119+
import { within } from '@testing-library/dom'
120120

121121
const { getByText } = within(document.getElementById('messages'))
122122
const helloMessage = getByText('hello')

docs/dom-testing-library/api-queries.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ The example below will find the input node for the following DOM structures:
107107
<!--Native-->
108108

109109
```javascript
110-
import { getByLabelText } from 'dom-testing-library'
110+
import { getByLabelText } from '@testing-library/dom'
111111

112112
const container = document.body
113113
const inputNode = getByLabelText(container, 'Username')
@@ -172,7 +172,7 @@ matches the given [`TextMatch`](#textmatch).
172172
<!--Native-->
173173

174174
```js
175-
import { getByPlaceholderText } from 'dom-testing-library'
175+
import { getByPlaceholderText } from '@testing-library/dom'
176176

177177
const container = document.body
178178
const inputNode = getByPlaceholderText(container, 'Username')
@@ -229,7 +229,7 @@ matching the given [`TextMatch`](#textmatch).
229229
<!--Native-->
230230

231231
```js
232-
import { getByText } from 'dom-testing-library'
232+
import { getByText } from '@testing-library/dom'
233233

234234
const container = document.body
235235
const aboutAnchorNode = getByText(container, /about/i)
@@ -305,7 +305,7 @@ as it's deprecated).
305305
<!--Native-->
306306

307307
```js
308-
import { getByAltText } from 'dom-testing-library'
308+
import { getByAltText } from '@testing-library/dom'
309309

310310
const container = document.body
311311
const incrediblesPosterImg = getByAltText(container, /incredibles.*? poster/i)
@@ -360,7 +360,7 @@ Will also find a `title` element within an SVG.
360360
<!--Native-->
361361

362362
```js
363-
import { getByTitle } from 'dom-testing-library'
363+
import { getByTitle } from '@testing-library/dom'
364364

365365
const container = document.body
366366
const deleteElement = getByTitle(container, 'Delete')
@@ -419,7 +419,7 @@ document.getElementById('lastName').value = 'Norris'
419419
<!--Native-->
420420

421421
```js
422-
import { getByDisplayValue } from 'dom-testing-library'
422+
import { getByDisplayValue } from '@testing-library/dom'
423423

424424
const container = document.body
425425
const lastNameInput = getByDisplayValue(container, 'Norris')
@@ -457,7 +457,7 @@ document.getElementById('messageTextArea').value = 'Hello World'
457457
<!--Native-->
458458

459459
```js
460-
import { getByDisplayValue } from 'dom-testing-library'
460+
import { getByDisplayValue } from '@testing-library/dom'
461461

462462
const container = document.body
463463
const messageTextArea = getByDisplayValue(container, 'Hello World')
@@ -499,7 +499,7 @@ matches the given [`TextMatch`](#textmatch).
499499
<!--Native-->
500500

501501
```js
502-
import { getByDisplayValue } from 'dom-testing-library'
502+
import { getByDisplayValue } from '@testing-library/dom'
503503

504504
const container = document.body
505505
const selectElement = getByDisplayValue(container, 'Alaska')
@@ -549,7 +549,7 @@ accepts a [`TextMatch`](#textmatch)).
549549
<!--Native-->
550550

551551
```js
552-
import { getByRole } from 'dom-testing-library'
552+
import { getByRole } from '@testing-library/dom'
553553

554554
const container = document.body
555555
const dialogContainer = getByRole(container, 'dialog')
@@ -599,7 +599,7 @@ also accepts a [`TextMatch`](#textmatch)).
599599
<!--Native-->
600600

601601
```js
602-
import { getByTestId } from 'dom-testing-library'
602+
import { getByTestId } from '@testing-library/dom'
603603

604604
const container = document.body
605605
const usernameInput = getByTestId(container, 'username-input')

docs/dom-testing-library/example-intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
// Tip: all queries are also exposed on an object
1616
// called "queries" which you could import here as well
1717
wait,
18-
} from 'dom-testing-library'
18+
} from '@testing-library/dom'
1919
// adds special assertions like toHaveTextContent
2020
import 'jest-dom/extend-expect'
2121

0 commit comments

Comments
 (0)