Skip to content

Commit d8acd81

Browse files
Jest testing (#309)
* Add jest package * Port analyze tests * Add testUnsafe helper and config.test.js * Add mini.pkg.1 to test-js/ * Add exec.test.js * Add emacsVersion helper Fix return type of emacsVersion() * NPM script to reset test environments * Add TestContext class and simplify exec.test.js * Add options.test.js * Add buttercup.test.js * Add outdated.test.js * Add emacs.test.js * Add search.test.js * Add link.test.js * Log cmd output when DEBUG is set * Fix config.test.js * Add test-ecukes.test.js * Add test-ert.test.js * Add test-ert-runner.test.js * Add exit-status tests * Add local.test.js * Add docker.test.js * Add install.test.js * Add global.test.js * Tidy up log formatting * config.test.js should create ~/.emacs.d/init.el * global.test.js should create ~/Eask * Update analyze.test.js with TestContext * Add default timeout and message when cmd is killed * Remove local timeouts in test files * Add some doco to helpers.js * fix: add some comments * Sketch of doco page * Example of exit code matching * Add some file helpers * Add comprehensive tests to link.test.js * Move upgrade-eask test to own file * Check result of commands in install.test.js * Disable js-elpa in install.test.js to speed up test * Add output transformation helper * Add examples of snapshots to analyze.test.js * Update doco with snapshot example * Simplify options.test.js using test table * Update bug descriptions in link.test.js * Sanitize windows style paths * fix: try using double quotes to fix windows issue in exec.test.js * Teardown global env when ALLOW_UNSAFE is true * Check for global Easkfile in info -g test * Add removeFiles helper method * Tidy up generated files in local.test.js * Move ./test-js to ./test/jest * Update local patch test-js => test/jest * Increase docker.test.js timeout * Tweak timeouts of local.test.js * docs: comment on boolean env vars * rename npm script test-docker to test-ci * use jest tests in workflows * Only run eask loc on emacs >= 28.1 * Increase timeout in config.test.js * docs: add method doco to helpers.js * In config.test.js throw if init.el exists * Add workflow for upgrade-eask test * Remove makefile targets and old script files * docs: Add sections on snapshots and timeouts * docs: move Testing page onto "Developing Eask" page * Rename buttercup.test.js and outdated.test.js consistently * delete unused test project * style: Format it * docs: Add zh-TW translation * docs: Translate comment as well --------- Co-authored-by: JenChieh <jcs090218@gmail.com>
1 parent c287d5c commit d8acd81

File tree

134 files changed

+6524
-1856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

134 files changed

+6524
-1856
lines changed

.github/workflows/analyze.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-analyze
76+
npm run test-unsafe test/jest/analyze.test.js

.github/workflows/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- master
77
paths:
8-
- 'eask'
8+
- 'eask'
99
- '**.yml'
1010
- lisp/**
1111
- cmds/**
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-config
76+
npm run test-unsafe test/jest/config.test.js

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
os:
32+
os:
3333
- ubuntu-latest
3434
# XXX: `macos-latest` on arm64 is not possible as well!?
3535
# See https://stackoverflow.com/questions/77675906/github-actions-build-docker-image-on-arm64-macos-latest-xlarge
@@ -67,4 +67,4 @@ jobs:
6767

6868
- name: Testing...
6969
run: |
70-
make command-docker
70+
npm run test-unsafe test/jest/docker.test.js

.github/workflows/emacs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-emacs
76+
npm run test-unsafe test/jest/emacs.test.js

.github/workflows/exec.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070

7171
- name: Testing...
7272
run: |
73-
make command-exec
73+
npm run test-unsafe test/jest/exec.test.js

.github/workflows/exit_status.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ jobs:
5050

5151
- name: Testing...
5252
run: |
53-
make command-exit-status
53+
npm run test-unsafe test/jest/exit-status.test.js

.github/workflows/global.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-global
76+
npm run test-unsafe test/jest/global.test.js

.github/workflows/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-install
76+
npm run test-unsafe test/jest/install.test.js

.github/workflows/link.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ jobs:
7070

7171
- name: Testing...
7272
run: |
73-
make command-link
73+
npm run test-unsafe test/jest/link.test.js

.github/workflows/local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373

7474
- name: Testing...
7575
run: |
76-
make command-local
76+
npm run test-unsafe test/jest/local.test.js

0 commit comments

Comments
 (0)