mirror of https://github.com/01-edu/public.git
add instructions to run tests locally for DOM & JS
This commit is contained in:
parent
115679182b
commit
f60af6b597
|
@ -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`
|
|
@ -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…
Reference in New Issue