Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused legacy token BrokenResolvable and cleanup #2

Merged
merged 2 commits into from
Apr 8, 2024

Conversation

ivov
Copy link
Collaborator

@ivov ivov commented Apr 8, 2024

The BrokenResolvable token was added to support a requirement that was later dropped, so this token is unused. I'm not clear on why BrokenResolvable is currently causing so many tests to fail on master. I wrote tests specifically for this token and Codemirror's test harness does not allow running a subset of tests, therefore I expect these were all passing back when v1 of this lib was released. But there was no CI to block merging in case of failing tests. In any case, this token is unneeded, so we can remove and simplify.

Once this lib is in the monorepo, regressions will be caught by test script runs.

npm run test

> codemirror-lang-n8n-expression@0.2.0 test
> npm run prepare && mocha test/test.js


> codemirror-lang-n8n-expression@0.2.0 prepare
> rollup -c


src/index.ts → dist/index.cjs, ./dist...
created dist/index.cjs, ./dist in 2.3s


  cases
    ✔ Resolvable
    ✔ Empty Resolvable
    ✔ Resolvable of only whitespace
    ✔ No content
    ✔ Plaintext
    ✔ Plaintext of single-brace-wrapped text
    ✔ Plaintext then Resolvable
    ✔ Resolvable then Plaintext
    ✔ Plaintext then Resolvable then Plaintext
    ✔ Resolvable then Plaintext then Resolvable
    ✔ Plaintext then Resolvable then Plaintext then Resolvable
    ✔ Resolvable then Plaintext then Resolvable then Plaintext
    ✔ Resolvable containing all resolvable chars
    ✔ Resolvable containing single left brace
    ✔ Resolvable containing double left brace
    ✔ Resolvable containing triple left brace
    ✔ Resolvable containing single right brace
    ✔ Resolvable containing escaped double right brace
    ✔ Resolvable containing escaped triple right brace
    ✔ Resolvable containing single-brace-wrapped text with escaping
    ✔ Resolvable containing double-brace-wrapped text with escaping
    ✔ Resolvable containing triple-brace-wrapped text with escaping
    ✔ Resolvable containing single-bracket-wrapped text
    ✔ Resolvable containing double-bracket-wrapped text
    ✔ Resolvable containing triple-bracket-wrapped text
    ✔ Plaintext of one opening brace
    ✔ Plaintext of one opening brace and two closing braces
    ✔ Plaintext then Resolvable with non-ASCII chars then Plaintext


  28 passing (60ms)

@ivov ivov changed the title Fix tests and build Remove unused legacy token BrokenResolvable and cleanup Apr 8, 2024
Copy link
Member

@netroy netroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks ❤️

@netroy netroy merged commit 99eeb25 into master Apr 8, 2024
@netroy netroy deleted the fix-tests-and-build branch April 8, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants