-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
17 changed files
with
7,887 additions
and
2,696 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ dist | |
docs | ||
tmp | ||
.github | ||
scripts | ||
.gitignore | ||
CHANGELOG.md | ||
Dockerfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +0,0 @@ | ||
Make it so 'qunitx' is a 0-dependency npm package, qunitx-cli the browser runner | ||
|
||
- "$ qunitx sanity-test.ts" made redundant due to (node --test mode) this should impact dependencies and internal modules | ||
- Implement other test cases in deno | ||
|
||
Shim dir structure should be: shims/nodejs/ shims/deno shims/browser | ||
Make package.json point to them correctly | ||
Make the package so esbuild build so esbuild builds when qunitx is vendored(if it needs to) | ||
|
||
Turn import { module, test } from '../../shims/nodejs.js' to import { module, test } from 'qunitx'; For this to happen browser bundler should pick up actual qunit | ||
|
||
Combine nix with Docker for faster container builds | ||
|
||
- also watch subdependencies on browser mode (-- how? investigate esbuild watch) | ||
- maybe make browser tests per file loading <script>, also could add asset maps maybe if puppeteer supports, this could fix initial "qf" bug | ||
|
||
implement and test require and timeout flags | ||
implement concurrency | ||
|
||
fix watcher for file removals make the logic smarter | ||
|
||
allow passing absolutePaths(maybe) | ||
|
||
- globs: test dynamically added file is watched on global input configuration | also check added files on watch gets put to config.fileOrFolderInputs | ||
currently parse-fs-inputs might be less performant on big folders(?) dependending on how watch is implemented | ||
- coverage | ||
watch parsed files from html(?) | ||
|
||
|
||
$ qunitx some-test --browser | default html doesnt match with $ qunitx init and also no html mode should be there | ||
|
||
try this: $ npx ava --tap | npx tap-difflet | ||
or this: $ npx ava --tap | npx faucet | ||
|
||
research mocha reporter(TAP > reporters | json stream metada then it consumes this metadata(how?)) | ||
example good reporters: spec(reporter), dot, tap, landing strip(interesting instead put percentage), jest | ||
|
||
esbuild ./tmp/test/passing-tests.js --bundle > test.js | ||
parse qunitx in the package.json for config | ||
|
||
failFast and babelOptions? | ||
files(and to ignore), require, timeout | ||
concurrencyStrategies | ||
|
||
add node and browser options | ||
add functionality to execute only one test | ||
add reporters | ||
|
||
pass timezone: https://stackoverflow.com/questions/16448754/how-to-use-a-custom-time-in-browser-to-test-for-client-vs-server-time-difference/39533934#39533934 | ||
= qunitx --timezone="US/Pacific" | ||
|
||
QUnit regex filters | ||
|
||
Jest Notes | ||
========== | ||
TestSequencer | ||
- this failed in the past? run first | ||
- when file changed latest | ||
- this test run in the past and was long? long tests run first | ||
- file size | ||
|
||
TestScheduler | ||
- schedule across threads | ||
- reporters | ||
- dont spawn many threads if total test count is small | ||
jest-runner/jest-puppeteer(check this) | ||
|
||
read jest-worker/worker_thread implementation | ||
|
||
|
||
check if jest-qunit exists | ||
|
||
jest-runtime(creates VM context) | ||
allows module mocking, custom require implementation, also does transforms | ||
runs the tests | ||
transform is sync in jest(dep tracking problem) | ||
|
||
TestResult / Repoter | ||
- all data has to be json serializable for threads | ||
- stack trace of errors | ||
- how many assertions | ||
|
||
AggregatedRestResult[] | ||
- finished test case, how long, each assertion | ||
- check jest runners | ||
|
||
qunitx init | ||
|
||
|
||
write test metadata(each test) if flag is provided | ||
|
||
markdown reporter(interesting: https://mochajs.org/#markdown) | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import fs from 'fs/promises'; | ||
|
||
let [qunitJS, qunitCSS, _] = await Promise.all([ | ||
fs.readFile('./node_modules/qunit/qunit/qunit.js'), | ||
fs.readFile('./node_modules/qunit/qunit/qunit.css'), | ||
fs.mkdir('./vendor', { recursive: true }) | ||
]); | ||
|
||
let newQUnit = qunitJS.toString().replace( | ||
'start: function start(count) {', | ||
`reset: function() { | ||
ProcessingQueue.finished = false; | ||
globalStartCalled = false; | ||
runStarted = false; | ||
config.queue.length = 0; | ||
config.modules.length = 0; | ||
config.autostart = false; | ||
Object.assign(config.stats, { total: 0, passed: 0, failed: 0, skipped: 0, todo: 0 }); | ||
[ | ||
"started", "updateRate", "filter", "depth", "current", | ||
"pageLoaded", "timeoutHandler", "timeout", "pollution" | ||
].forEach( ( key ) => delete config[ key ] ); | ||
const suiteReport = config.currentModule.suiteReport; | ||
suiteReport.childSuites.length = 0; | ||
delete suiteReport._startTime; | ||
delete suiteReport._endTime; | ||
config.modules.push( config.currentModule ); | ||
}, | ||
start: function start(count) {`); | ||
|
||
await Promise.all([ | ||
fs.writeFile('./vendor/qunit.js', newQUnit), | ||
fs.writeFile('./vendor/qunit.css', qunitCSS), | ||
createPackageJSONIfNotExists() | ||
]); | ||
|
||
async function createPackageJSONIfNotExists() { | ||
try { | ||
await fs.stat('./vendor/package.json'); | ||
|
||
return true; | ||
} catch (error) { | ||
await fs.writeFile('./vendor/package.json', JSON.stringify({ | ||
name: 'qunitx-vendor', | ||
version: '0.0.1' | ||
})); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"imports": { | ||
"qunitx": "./shims/deno.js" | ||
"qunitx": "./shims/deno/index.js" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.