Skip to content

Commit e36805b

Browse files
authored
Adopt config from other Testing Library repos (fix #13) (#23)
1 parent 9aa5ff0 commit e36805b

20 files changed

+25769
-7147
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/ISSUE_TEMPLATE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Thanks for your interest in the project. I appreciate bugs filed and PRs submitted!
3+
Please make sure that you are familiar with and follow the Code of Conduct for
4+
this project.
5+
6+
Please fill out this template with all the relevant information so we can
7+
understand what's going on and fix the issue.
8+
9+
I'll probably ask you to submit the fix (after giving some direction). If you've
10+
never done that before, that's great! Check this free short video tutorial to
11+
learn how: https://kcd.im/pull-request
12+
13+
14+
If this is an issue with the documentation, please file an issue in the docs repo:
15+
https://github.com/testing-library/testing-library-docs
16+
17+
-->
18+
19+
- Testing Library Recorder Extension version:
20+
- Testing Library versions:
21+
- Testing Framework and version:
22+
<!-- are you using jest, mocha, puppeteer, ava? And what version? -->
23+
- DOM Environment:
24+
<!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->
25+
26+
Relevant code or config
27+
28+
```js
29+
30+
```
31+
32+
What you did:
33+
34+
What happened:
35+
36+
<!-- Please provide the full error message/screenshots/anything -->
37+
38+
Problem description:
39+
40+
Suggested solution:
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: Bugs, missing documentation, or unexpected behavior 🤔.
4+
---
5+
6+
<!--
7+
8+
* Please fill out this template with all the relevant information so we can
9+
understand what's going on and fix the issue. We appreciate bugs filed and PRs
10+
submitted!
11+
12+
* Please make sure that you are familiar with and follow the Code of Conduct for
13+
this project.
14+
15+
We'll probably ask you to submit the fix (after giving some direction). If
16+
you've never done that before, that's great! Check this free short video
17+
tutorial to learn how: https://kcd.im/pull-request
18+
19+
If this is an issue with the documentation, please file an issue in the docs repo:
20+
https://github.com/testing-library/testing-library-docs
21+
-->
22+
23+
- Testing Library Recorder Extension version:
24+
- Testing Library versions:
25+
- Testing Framework and version:
26+
<!-- are you using jest, mocha, puppeteer, ava? And what version? -->
27+
- DOM Environment:
28+
<!-- If you're using jsdom (the default with jest), what version? Otherwise, what browser and version are you running tests in? -->
29+
30+
### Relevant code or config:
31+
32+
```js
33+
var your => (code) => here;
34+
```
35+
36+
### What you did:
37+
38+
<!-- What you were doing -->
39+
40+
### What happened:
41+
42+
<!-- Please provide the full error message/screenshots/anything -->
43+
44+
### Reproduction:
45+
46+
<!--
47+
If possible, please create a repository that reproduces the issue with the
48+
minimal amount of code possible.
49+
50+
Repository template: https://github.com/testing-library/dom-testing-library-template
51+
52+
Or if you can, try to reproduce the issue in a Codesandbox. You can fork the one
53+
here: https://codesandbox.io/s/5z6x4r7n0p
54+
-->
55+
56+
### Problem description:
57+
58+
<!-- Please describe why the current behavior is a problem -->
59+
60+
### Suggested solution:
61+
62+
<!--
63+
It's ok if you don't have a suggested solution, but it really helps if you could
64+
do a little digging to come up with some suggestion of how to improve things.
65+
-->
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
name: 💡 Feature Request
3+
about: I have a suggestion (and might want to implement myself 🙂)!
4+
---
5+
6+
<!--
7+
8+
Vote on feature requests by adding a 👍. This helps maintainers prioritize what
9+
to work on.
10+
11+
* Please fill out this template with all the relevant information so we can
12+
understand what's going on and fix the issue. We appreciate bugs filed and PRs
13+
submitted!
14+
15+
* Please make sure that you are familiar with and follow the Code of Conduct for
16+
this project.
17+
18+
It'd be great if after the discussion you're the one who submits the PR that
19+
implements this feature. If you've never done that before, that's great! Check
20+
this free short video tutorial to learn how: https://kcd.im/pull-request
21+
22+
23+
If this is an issue with the documentation, please file an issue in the docs repo:
24+
https://github.com/testing-library/testing-library-docs
25+
-->
26+
27+
### Describe the feature you'd like:
28+
29+
<!--
30+
A clear and concise description of what you want to happen. Add any considered
31+
drawbacks.
32+
-->
33+
34+
### Suggested implementation:
35+
36+
<!-- Helpful but optional 😀 -->
37+
38+
### Describe alternatives you've considered:
39+
40+
<!--
41+
A clear and concise description of any alternative solutions or features you've
42+
considered.
43+
-->
44+
45+
### Teachability, Documentation, Adoption, Migration Strategy:
46+
47+
<!--
48+
If you can, explain how users will be able to use this and possibly write out a
49+
version of the docs.
50+
-->

.github/ISSUE_TEMPLATE/Question.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: ❓ Support Question
3+
about: 🛑 If you have a question 💬, please check out our support channels!
4+
---
5+
6+
------------ 👆 Click "Preview"!
7+
8+
Issues on GitHub are intended to be related to problems with the library itself
9+
and feature requests so we recommend not using this medium to ask them here 😁.
10+
11+
---
12+
13+
## ❓ Support Forums
14+
15+
- Discord https://discord.gg/testing-library
16+
- Stack Overflow
17+
https://stackoverflow.com/questions/tagged/react-testing-library
18+
19+
**ISSUES WHICH ARE QUESTIONS WILL BE CLOSED**

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!--
2+
Thanks for your interest in the project. Bugs filed and PRs submitted are appreciated!
3+
4+
Please make sure that you are familiar with and follow the Code of Conduct for
5+
this project.
6+
7+
Also, please make sure you're familiar with and follow the instructions in the
8+
contributing guidelines (found in the CONTRIBUTING.md file).
9+
10+
If you're new to contributing to open source projects, you might find this free
11+
video course helpful: https://kcd.im/pull-request
12+
13+
Please fill out the information below to expedite the review and (hopefully)
14+
merge of your pull request!
15+
-->
16+
17+
<!-- What changes are being made? (What feature/bug is being fixed here?) -->
18+
19+
**What**:
20+
21+
<!-- Why are these changes necessary? -->
22+
23+
**Why**:
24+
25+
<!-- How were these changes implemented? -->
26+
27+
**How**:
28+
29+
<!-- Have you done all of these things? -->
30+
31+
**Checklist**:
32+
33+
<!-- add "N/A" to the end of each line that's irrelevant to your changes -->
34+
35+
<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->
36+
37+
- [ ] Documentation added to the README.md file or
38+
[docs site](https://github.com/testing-library/testing-library-docs)
39+
- [ ] Tests
40+
- [ ] Ready to be merged
41+
<!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
42+
43+
<!-- feel free to add additional comments -->

.github/workflows/node.js.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/validate.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: validate
2+
on:
3+
push:
4+
branches:
5+
# Match SemVer major release branches
6+
# e.g. "12.x" or "8.x"
7+
- '[0-9]+.x'
8+
- 'main'
9+
- 'next'
10+
- 'next-major'
11+
- 'beta'
12+
- 'alpha'
13+
- '!all-contributors/**'
14+
pull_request: {}
15+
jobs:
16+
main:
17+
# ignore all-contributors PRs
18+
if: ${{ !contains(github.head_ref, 'all-contributors') }}
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: 🛑 Cancel Previous Runs
22+
uses: styfle/[email protected]
23+
24+
- name: ⬇️ Checkout repo
25+
uses: actions/checkout@v3
26+
with:
27+
# required by codecov/codecov-action
28+
fetch-depth: 0
29+
30+
- name: ⎔ Setup node
31+
uses: actions/setup-node@v3
32+
33+
- name: 📥 Download deps
34+
uses: bahmutov/npm-install@v1
35+
36+
- name: Verify format (`npm run format` committed?)
37+
run: npm run format -- --check --no-write
38+
39+
- name: ▶️ Run validate script
40+
run: npm run validate
41+
42+
- name: ⬆️ Upload coverage report
43+
uses: codecov/codecov-action@v1
44+
with:
45+
fail_ci_if_error: true

.gitignore

Lines changed: 1 addition & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,3 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
1+
node_modules
222
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
40-
# Dependency directories
41-
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
46-
47-
# TypeScript cache
48-
*.tsbuildinfo
49-
50-
# Optional npm cache directory
51-
.npm
52-
53-
# Optional eslint cache
54-
.eslintcache
55-
56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
71-
# dotenv environment variables file
72-
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
833
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port

.huskyrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = require('kcd-scripts/husky')

0 commit comments

Comments
 (0)