Open nicholaswmin opened 4 months ago
Hey, thanks for reporting!
This shouldn't affect anyone using this package, as it is probably related to some devDependency and the package itself has no dependencies. But it should and will be addressed.
PRs are always welcome if you have the time!
Hi keipers, thanks for keeping this alive - sorry for the late response.
Indeed; nope not that big of a problem.
but what I'd do first and foremost is move the tests to native test runner and ditch any dependencies. I detest them in any shape and form.
If you're up for it, maybe I can push a small prototype with some parts migrated to it to a PR so you can decide if it makes sense?
I can take it up if you like it & i don't mind if you don't either.
Here's a recent example (I'll be matching the code-style of your test-suite ofc):
import test from 'node:test'
import utils from '../src/utils.js'
// - Polysyllabic test case fixes: https://github.com/nicholaswmin/fsm/issues/1
test('#utils String.onify(str)', async t => {
const result = utils.String.onify('foo')
await t.test('returns a result', t => {
t.assert.ok(result, `${result} is falsy`)
})
await t.test('returns a string', t => {
t.assert.strictEqual(typeof result, 'string')
})
await t.test('passing an all-lowercase string', async t => {
const result = utils.String.onify('foo')
await t.test('appends "on"', async t => {
t.assert.ok(result.startsWith('on'), `got: ${result} instead`)
await t.test('just once', t => {
t.assert.strictEqual(result.split('on').length, 2)
})
})
await t.test('uppercases 1st char', async t => {
t.assert.strictEqual(result[2], 'F')
await t.test('remainder is unchanged', t => {
t.assert.strictEqual(result.split('onF').slice(1).join(''), 'oo')
})
})
})
})
PRs are always welcome if you have the time!
Yup sometimes i do :)
Hi bud,
Got a couple of deprecations, not sure where they are from. I can jump in and issue a PR if you're fine with it.
Repro
Run: