Browse Source

add instructions to run tests locally for DOM & JS

pull/754/head
Clement Denis 3 years ago
parent
commit
f60af6b597
  1. 33
      dom/README.md
  2. 31
      js/README.md

33
dom/README.md

@ -0,0 +1,33 @@
# DOM
Tests that use puppeteer to do browser side exercises
## Run test locally
### Installation
> You need node version 14+
```bash
# Clone the repo
git clone https://github.com/01-edu/public.git
# go into the dom directory
cd public/dom
# install puppeteer
npm i puppeteer
```
### Executing a test
```bash
# run a test
SOLUTION_PATH=/user/you/piscine-repo node test.js exercise-name
```
The `SOLUTION_PATH` is the directory where the test should look
for your solution, usualy your piscine repository.
The `exercise-name` argument should match exactly the name of an
exercise, not including `.js`

31
js/README.md

@ -0,0 +1,31 @@
# JS
Tests that use node to do JavaScript exercises
## Run test locally
### Installation
> You need node version 14+
```bash
# Clone the repo
git clone https://github.com/01-edu/public.git
# go into the dom directory
cd public/js/tests
```
### Executing a test
```bash
# run a test
node test.mjs /user/you/piscine-repo exercise-name
```
The first argument `/user/you/piscine-repo` is the directory
where the test should look for your solution,
usualy your piscine repository.
The second argument `exercise-name` should match exactly
the name of an exercise, not including `.js`
Loading…
Cancel
Save