Skip to content
This repository was archived by the owner on Mar 5, 2022. It is now read-only.

Commit 99a7443

Browse files
committed
rename file
1 parent 85943de commit 99a7443

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cypress/component/advanced/testing-lib-example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
You can install and bring [Testing library/Cypress](https://testing-library.com/docs/react-testing-library/example-intro) to be used in these React component tests. The following example was copied from [react-testing-library/example-intro](https://testing-library.com/docs/react-testing-library/example-intro).
44

5-
- [Fetch.js](Fetch.js) is the component we are testing
5+
- [fetcher.js](fetcher.js) is the component we are testing
66
- [testing-lib-spec.js](testing-lib-spec.js) is component test implemented using `Testing library/Cypress`
77

88
```js

cypress/component/advanced/testing-lib-example/fetch.js renamed to cypress/component/advanced/testing-lib-example/fetcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState } from 'react'
22
import axios from 'axios'
33

4-
export default function Fetch({ url }) {
4+
export default function Fetcher({ url }) {
55
const [greeting, setGreeting] = useState('')
66
const [buttonClicked, setButtonClicked] = useState(false)
77

cypress/component/advanced/testing-lib-example/spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React from 'react'
22
import { mount } from 'cypress-react-unit-test'
3-
import Fetch from './Fetch'
3+
import Fetcher from './fetcher'
44

55
it('loads and displays greeting', () => {
66
cy.server()
77
cy.route('/greeting', { greeting: 'Hello there' }).as('greet')
88

99
const url = '/greeting'
10-
mount(<Fetch url={url} />)
10+
mount(<Fetcher url={url} />)
1111

1212
cy.contains('Load Greeting').click()
1313
cy.get('[role=heading]').should('have.text', 'Hello there')

cypress/component/advanced/testing-lib-example/testing-lib-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react'
22
import { mount } from 'cypress-react-unit-test'
3-
import Fetch from './Fetch'
3+
import Fetcher from './fetcher'
44

55
// https://testing-library.com/docs/cypress-testing-library/intro
66
import '@testing-library/cypress/add-commands'
@@ -10,7 +10,7 @@ it('loads and displays greeting (testing-lib)', () => {
1010
cy.route('/greeting', { greeting: 'Hello there' }).as('greet')
1111

1212
const url = '/greeting'
13-
mount(<Fetch url={url} />)
13+
mount(<Fetcher url={url} />)
1414

1515
cy.findByText('Load Greeting')
1616
.wait(1000)

0 commit comments

Comments
 (0)