Skip to content

Commit 8287cb7

Browse files
fix: chore
1 parent 75813ff commit 8287cb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

content/docs/addons-test-utils.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ class Counter extends React.Component {
6262
this.handleClick = this.handleClick.bind(this);
6363
}
6464
componentDidMount() {
65-
document.title = `You clicked ${this.state.count} times`;
65+
document.title = `Bạn click ${this.state.count} lần`;
6666
}
6767
componentDidUpdate() {
68-
document.title = `You clicked ${this.state.count} times`;
68+
document.title = `Bạn click ${this.state.count} lần`;
6969
}
7070
handleClick() {
7171
this.setState(state => ({
@@ -105,22 +105,22 @@ afterEach(() => {
105105
container = null;
106106
});
107107
108-
it('can render and update a counter', () => {
108+
it('có thể render và cập nhật counter', () => {
109109
// Test first render and componentDidMount
110110
act(() => {
111111
ReactDOM.render(<Counter />, container);
112112
});
113-
const button = container.querySelector('button');
113+
const button = container.querySelector('nút bấm');
114114
const label = container.querySelector('p');
115-
expect(label.textContent).toBe('You clicked 0 times');
116-
expect(document.title).toBe('You clicked 0 times');
115+
expect(label.textContent).toBe('Bạn click 0 lần');
116+
expect(document.title).toBe('Bạn click 0 lần');
117117
118118
// Test second render and componentDidUpdate
119119
act(() => {
120120
button.dispatchEvent(new MouseEvent('click', {bubbles: true}));
121121
});
122-
expect(label.textContent).toBe('You clicked 1 times');
123-
expect(document.title).toBe('You clicked 1 times');
122+
expect(label.textContent).toBe('Bạn click 1 lần');
123+
expect(document.title).toBe('Bạn click 1 lần');
124124
});
125125
```
126126

0 commit comments

Comments
 (0)