-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: updated (dev|peer)Dependencies (#61)
- Loading branch information
1 parent
2c58b8d
commit 7ed5cbb
Showing
15 changed files
with
3,871 additions
and
2,928 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Docs | ||
# - https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
reviewers: | ||
- "natterstefan" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "chore" | ||
include: "scope" | ||
ignore: | ||
# For all packages, ignore all patch updates | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-patch"] | ||
|
||
- package-ecosystem: "npm" | ||
reviewers: | ||
- "natterstefan" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
open-pull-requests-limit: 10 | ||
labels: | ||
- "dependencies" | ||
commit-message: | ||
prefix: "chore" | ||
prefix-development: "chore(dev)" | ||
include: "scope" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-patch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
packages/example-ts-react/src/components/__tests__/__snapshots__/index.test.tsx.snap
This file was deleted.
Oops, something went wrong.
31 changes: 14 additions & 17 deletions
31
packages/example-ts-react/src/components/__tests__/index.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,26 @@ | ||
import React from 'react' | ||
import { shallow } from 'enzyme' | ||
import { act } from 'react-dom/test-utils' | ||
import { render, screen } from '@testing-library/react' | ||
|
||
import { App } from '../app' | ||
|
||
jest.useFakeTimers() | ||
|
||
describe('App', () => { | ||
it('renders', () => { | ||
const wrapper = shallow(<App />) | ||
expect(wrapper.text()).toBe( | ||
'Hello eslint-config-ns-ts<Text />State Counter: 0', | ||
) | ||
expect(wrapper).toMatchSnapshot() | ||
}) | ||
|
||
it('increases counter every 1 second', () => { | ||
const wrapper = shallow(<App />) | ||
expect(wrapper.text()).toBe( | ||
'Hello eslint-config-ns-ts<Text />State Counter: 0', | ||
) | ||
render(<App />) | ||
const elem = screen.getByTestId('counter') | ||
expect(elem.innerHTML).toBe('0') | ||
|
||
act(() => { | ||
jest.advanceTimersByTime(1000) | ||
}) | ||
|
||
jest.advanceTimersByTime(1000) | ||
expect(wrapper.text()).toContain('State Counter: 1') | ||
expect(elem.innerHTML).toBe('1') | ||
|
||
jest.advanceTimersByTime(1000) | ||
expect(wrapper.text()).toContain('State Counter: 2') | ||
act(() => { | ||
jest.advanceTimersByTime(1000) | ||
}) | ||
expect(elem.innerHTML).toBe('2') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import React, { useState, FunctionComponent } from 'react' | ||
import React, { FunctionComponent, useState, useEffect } from 'react' | ||
|
||
import { Text } from './text' | ||
|
||
export const App: FunctionComponent = () => { | ||
const [counter, setCounter] = useState(0) | ||
const headline = 'Hello eslint-config-ns-ts' | ||
|
||
setInterval(() => setCounter(counter + 1), 1000) | ||
useEffect(() => { | ||
setInterval(() => setCounter(c => c + 1), 1000) | ||
}, []) | ||
|
||
return ( | ||
<> | ||
<h1>{headline}</h1> | ||
<Text text="Hello World" /> | ||
<p>State Counter: {counter}</p> | ||
<p> | ||
State Counter: <span data-testid="counter">{counter}</span> | ||
</p> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.