1
0
mirror of synced 2025-12-30 03:01:36 -05:00
Files
docs/script/warm-before-tests.mjs
Peter Bengtsson 01baeda3c0 sync serialize sitedata to disk (#25749)
* sync serialize sitedata to disk

* use os.tmpdir

* refactor tests

* debugging

* use log

* debugging

* louder about syntax errors

* warn-before-tests

* louder about disk-caching redirects

* less loud

* only in development again
2022-03-09 20:57:40 -05:00

23 lines
630 B
JavaScript
Executable File

#!/usr/bin/env node
// [start-readme]
//
// It runs the warmServer() function because that function can do things
// like writing to disk as a caching mechanism.
// When jest runs tests, it starts multiple concurrent processes,
// even if it runs it serially (`--runInBand`) so it's highly likely
// that two concurrent processes both attempt to writing to
// the same exact file. By running this script before anything
// begins, we can be certain that files that should have been created
// are created.
//
// [end-readme]
import warmServer from '../lib/warm-server.js'
main()
async function main() {
await warmServer()
}