Skip to content

Commit f2a730a

Browse files
committed
Updating CHANGELOG and README.
1 parent 22fde9a commit f2a730a

File tree

2 files changed

+45
-16
lines changed

2 files changed

+45
-16
lines changed

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [2.0.0] - 2024-04-22
8+
### Added
9+
- Aliases in `.ashrc.dist`.
10+
- jsdoc.
11+
12+
### Changed
13+
- Node 16.14.2 => 21.
14+
- c8 7.14.0 => 9.1.0.
15+
- chai 4.4.1 => 5.1.0.
16+
- mocha 10.3.0 10.4.0.
17+
- sinon 15.2.0 => 17.0.1.
18+
- Generating code and test from configuration files.
19+
- Customised user in the container instead of root.
20+
21+
### Removed
22+
- Community code and test.
23+
724
## [1.17.0] - 2023-01-31
825
### Added
926
- Tests for "Remainder fantasy".

README.md

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ It only contains Mocha tests to let you code in your favorite IDE, outside of th
55

66
[![License](https://img.shields.io/github/license/cyrilverloop/codingame-js-tests)](https://github.com/cyrilverloop/codingame-js-tests/blob/trunk/LICENSE)
77

8+
**This project now uses Node 21+.
9+
Unfortunaly, CodinGame is still on Node 16.14.2
10+
which is not [supported](https://nodejs.org/en/about/previous-releases#release-schedule) anymore.
11+
If you want to run your code on Node 16.14.2,
12+
you can use a version up to 1.x of this software which do not receive further update.**
13+
814

915
## Installation
1016

@@ -15,43 +21,49 @@ user@host projects$ git clone https://github.com/cyrilverloop/codingame-js-tests
1521
user@host projects$ cd codingame-js-tests
1622
```
1723

24+
Copy some configuration files for Docker :
25+
```shellsession
26+
user@host projects$ cp ./.env.dist ./.env
27+
user@host projects$ cp ./.ashrc.dist ./.ashrc
28+
```
29+
Edit the `./.env` to use your user UID and GID in the container if necessary.
30+
The `./.ashrc`, `./.env` and `./docker-compose.override.yml` files are ignored by git, you can modify them to your needs.
31+
The `./.ashrc` add some aliases to your container.
32+
1833
Installing the dependencies :
1934
```shellsession
2035
user@host codingame-js-tests$ docker compose run --rm app npm i
2136
```
2237

23-
24-
## Add your code
25-
26-
Every files in `./lib/**/*.dist` files have an `execute()` method with the default CodinGame code.
27-
To try a puzzle, copy the corresponding file and change the extension to `js` :
38+
Generate the code and test files :
2839
```shellsession
29-
user@host codingame-js-tests$ cp ./lib/training/easy/unary/unary.dist ./ls/training/easy/unary/unary.js
40+
user@host codingame-js-tests$ docker compose run --rm app npm run generate
3041
```
31-
Then, add your code to solve the puzzle.
3242

33-
**If you do not have an `execute()` method in it, the tests will not be able to run.**
43+
**Existing code, test, input and output files will not be overwritten.
44+
To generate a file again, you must delete it first.**
45+
46+
47+
## Add your code
48+
49+
Every files in `./lib/**/CGCode.js` files have an `execute()` method with the default CodinGame code.
50+
A test executes the `execute()` method. You can add your code in and arround it.
3451

3552

3653
## Test your solution
3754

38-
Executing tests for a specific puzzle :
55+
Executing tests for a specific code :
3956
```shellsession
4057
user@host codingame-js-tests$ docker compose run --rm app npm test ./test/training/easy/unary/
4158
```
4259

43-
Executing all the tests :
44-
```shellsession
45-
user@host codingame-js-tests$ docker compose run --rm app npm test ./test/**/*.js
46-
```
47-
4860

4961
## Add your test (optional)
5062

5163
Every tests in `./test/**/CGTest.js` files include the tests from CodinGame.
52-
You can add your own tests in other `./test/**/*.js` files.
64+
You can add your own tests in `./test/**/*.js` files.
5365

5466

5567
## Time limit
5668

57-
The maximum time allowed for a puzzle may differ from CodinGame.
69+
The maximum time allowed may differ from CodinGame.

0 commit comments

Comments
 (0)