Skip to content

Instantly share code, notes, and snippets.

@nijotz
Last active May 22, 2020 17:07
Show Gist options
  • Save nijotz/90b0e14f87f3c48f2a7fe1b5e5565760 to your computer and use it in GitHub Desktop.
Save nijotz/90b0e14f87f3c48f2a7fe1b5e5565760 to your computer and use it in GitHub Desktop.
Screw it, we're re-writing it in Rust
/* * * * * * * * * * * * * * * * * * * * * *
* First try
*/
let {skip, secret} = getTestSecret('LICENSE')
tap.test('first test', {skip}, (t) => {
//...
})
// Doesn't like the leading brace, thinks it's a code block
{skip, secret} = getTestSecret('OTHER_LICENSE')
tap.test('second test', {skip}, (t) => {
//...
})
/* * * * * * * * * * * * * * * * * * * * * *
* Second try
*/
let {skip, secret} = getTestSecret('LICENSE')
tap.test('first test', {skip}, (t) => {
//...
})
// Gets rid of syntax error, but tries to treat this as parameters
// to a function on the line above since there is no semicolon
({skip, secret} = getTestSecret('OTHER_LICENSE'))
tap.test('second test', {skip}, (t) => {
//...
})
/* * * * * * * * * * * * * * * * * * * * * *
* Third try
*/
let {skip, secret} = getTestSecret('LICENSE')
tap.test('first test', {skip}, (t) => {
//...
});
// Add the semicolon above, but this all just looks wrong
({skip, secret} = getTestSecret('OTHER_LICENSE'))
tap.test('second test', {skip}, (t) => {
//...
})
/* * * * * * * * * * * * * * * * * * * * * *
* Fourth try
*/
let {skip, secret} = getTestSecret('LICENSE')
tap.test('first test', {skip}, (t) => {
//...
})
// I guess?? :shrug:
let rtrn = getTestSecret('OTHER_LICENSE')
skip = rtrn.skip
secret = rtrn.secret
tap.test('second test', {skip}, (t) => {
//...
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment