summaryrefslogtreecommitdiff
path: root/tests (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* src/hero.mjs: Add emitHeaders()EuAndreh2024-03-151-0/+24
|
* src/hero.mjs: Add comboForLabel()EuAndreh2024-03-151-0/+20
|
* src/hero.mjs: Add isValidLabel()EuAndreh2024-03-151-0/+19
|
* tests/lighttpd.conf: add the upgrade header without replacing existing onesEuAndreh2024-03-141-1/+1
|
* tests/lighttpd.conf: Forward "enable" header to allow connection upgradeEuAndreh2024-03-141-0/+3
|
* src/hero.mjs: Include "headers" and "ref" in request paramEuAndreh2024-03-141-7/+48
|
* src/hero.mjs: Add timing data to "in-response" log entryEuAndreh2024-03-081-2/+5
|
* src/utils.mjs: Add dissoc()EuAndreh2024-03-081-0/+18
|
* src/web.mjs: Move logging and interceptors to the beginning of the fileEuAndreh2024-03-081-491/+491
|
* src/hero.mjs: Make sure globalInceptors are used even when we get a 404EuAndreh2024-03-081-1/+16
|
* src/hero.mjs: Add buildTable()EuAndreh2024-03-081-0/+13
|
* src/hero.mjs: server.listen() -> server.start(); server.close() -> server.stop()EuAndreh2024-03-071-4/+4
|
* src/hero.mjs: Add makeReopeningPipeReader()EuAndreh2024-03-071-25/+89
| | | | | This addresses point nº 2 from commit 40118a188fb05219d1188ff775ce71f66c8cb56a.
* src/hero.mjs: makePipeReader() now returns a function for closing itEuAndreh2024-03-071-4/+0
|
* tests/js/hero.mjs: Better names for pipes and sockets created by testsEuAndreh2024-03-071-21/+28
|
* src/hero.mjs: Add minimalistic "ping" action for doing smoke tests in productionEuAndreh2024-03-061-0/+19
|
* src/hero.mjs: Add simplified implementation of `makePipeReader()`EuAndreh2024-03-061-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few limitations of the current approach that I didn't figure out how to solve yet: 1. when stopping the server, mainly for shutting down the Node.js process when running the tests, we need to open and close the pipe in write mode at least once, otherwise it hangs forever. After opening and closing it, the "autoClose" functionality of the `fs.createReadStream()` kicks in, and it closes, otherwise the test hangs forever as Node.js still has open handles. That's why the `server.close()` function has a gratuitous call to `fs.createWriteStream(pipe).end()`: so that when stopping the server, the pipe is always closed at least once; 2. when actually running the application, if one tries an IPC command like: $ echo '{ "action": "config-dump" }' > web.pipe It works, but only for the first time. As this shell line opened the pipe, wrote to it and then closed it, the reader that `makePipeReader()` constructed closed, but didn't open it again. So when running the exact same IPC command for a second time, the shell hangs, as there is no process on the other side listening for the command and consuming the pipe. Shortcoming nº 2 is much more important to be solved, as we can live with shortcoming nª 1 for some time. Both are to be fixed in the near future.
* src/hero.mjs: Change server.listen() to receive no argumentsEuAndreh2024-03-061-4/+6
|
* src/hero.mjs: Add skeleton for makePipeReaderFn()EuAndreh2024-03-061-0/+20
|
* src/hero.mjs: Add makeLineEmitter()EuAndreh2024-03-061-0/+81
|
* src/utils.mjs: Add first(), rest(), butlast() and last()EuAndreh2024-03-061-0/+78
|
* src/hero.mjs: Add rmIf() and mkfifo()EuAndreh2024-03-062-7/+82
|
* tests/runner.mjs: Add missing await in t.test("", () => {})EuAndreh2024-03-066-152/+153
|
* src/utils.mjs: s/first/findFirst/gEuAndreh2024-03-061-8/+8
|
* src/hero.mjs: Add app name as first argument to buildServer()EuAndreh2024-03-011-3/+3
|
* src/hero.mjs: Add actionsFn() and lineHandlerFn()EuAndreh2024-03-011-1/+113
|
* Setup user-level lighttpd reverse proxy for development and testingEuAndreh2024-03-011-0/+32
| | | | Add static files as in production, too.
* src/api.mjs: Simplify handling of argumentsEuAndreh2024-03-011-1/+1
|
* src/utils.mjs: Remove eq(), use utils.isDeepStrictEqual from "node:utils" ↵EuAndreh2024-03-011-81/+0
| | | | instead
* src/utils.mjs: Replace promisify() by util.promisify()EuAndreh2024-02-281-33/+0
|
* src/utils.mjs: Add undefinedAsNull()EuAndreh2024-02-281-0/+20
|
* src/utils.mjs: Define strSortFn() and use it on all filesEuAndreh2024-02-282-1/+20
|
* tests/runner.mjs: Use process.stderr.write() to avoid printing newlines when ↵EuAndreh2024-02-281-2/+5
| | | | not needed
* tests/runner.mjs: Remove unused `AssertionError` typeEuAndreh2024-02-281-2/+0
|
* src/hero.mjs: Promote log() to fancy logger objectEuAndreh2024-02-252-12/+209
|
* Explicit import from "node:process"; move log() to hero.mjsEuAndreh2024-02-254-24/+35
|
* Normalize how modules import and name each otherEuAndreh2024-02-248-38/+39
| | | | | Also add a `defaultInterceptors` variable in `src/hero.mjs` to avoid needing to redefine it in every application.
* src/hero.mjs: Add buildServer()EuAndreh2024-02-234-130/+284
|
* Implement accretion.runMigrations() and wrappings of node-sqlite3EuAndreh2024-02-233-3/+203
|
* Big cleanupEuAndreh2024-02-2311-166/+1368
| | | | | | - delete all SQLite Node-API code: we'll use the C++ one instead; - implement hero.mjs, with tests! - use ESM all over.
* Remove C code and cleanup repositoryEuAndreh2024-02-219-295/+0
|
* tests/js/db.js: Disable test for incomplete codeEuAndreh2023-11-271-1/+1
|
* tests/runner.js: Replace hand-rolled assert with "node:assert" moduleEuAndreh2023-11-162-56/+45
|
* Add WIP non-async functions to napi-sqlite.cEuAndreh2023-11-161-0/+16
|
* Add support for multi-file C projectEuAndreh2023-11-157-40/+197
| | | | | | - have dynamic discovered dependencies via `mkdeps.hs`, and also move the listing of JavaScript files to it. - copy over stub C files for setting up the project skeleton.
* tests/assert-*.sh: Reuse rebuilt assets for testsEuAndreh2023-11-133-22/+6
|
* tests/assert-*.sh: Allow tests to run independently from "all" and from each ↵EuAndreh2023-11-134-16/+34
| | | | other
* tests/assert-uninstall.sh: Split from assert-install.shEuAndreh2023-11-132-14/+24
|
* tests/assert-*.sh: Normalize output using yellow and green colorsEuAndreh2023-11-123-10/+15
|
* src/{ircd,web}.js: Init stub serversEuAndreh2023-11-112-0/+14
|