Skip to content

Instantly share code, notes, and snippets.

@pygy
Last active April 8, 2022 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pygy/b4ecfcc1d50f286274c3087bab2c272c to your computer and use it in GitHub Desktop.
Save pygy/b4ecfcc1d50f286274c3087bab2c272c to your computer and use it in GitHub Desktop.
// USAGE
// -----
//
// TODO("Finish this")
// Add this anywhere in your project or test suite,
// it will cause your tests to fail with the message.
//
// This is not meant to ever be commited, but you're sure
// to never lose track of a TODO before pushing your
// changes
import o from "ospec"
let c = 0
global.TODO = msg => {
try{
o().satisfies(()=>({pass: false, message: "TODO:\n-----\n\n"+msg}))
}catch(e){
o("TODO "+ ++c, ()=>{
o().satisfies(()=>({
pass: false,
message: `${"-".repeat(6 + String(c).length)}\n\n${msg}`}))
})
}
}
TODO 1:
-------
Detect back references in unkonwn regexps and mark the result as having backrefs
Improve the metadata system to avoid duplicate scanning (for the various properties)
Don't attach direction metadata to RegExps we didn't create
Attach them to everything we produce
at file:///Users/pygy/dev/compose-regexp.js/test-utils/utils.js:94:8
backwards and atoms > look behind assertions:
TODO:
-----
finish this
at global.TODO (file:///Users/pygy/dev/compose-regexp.js/test-utils/utils.js:91:7)
at file:///Users/pygy/dev/compose-regexp.js/tests/tests.js:657:3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment