reduce the number of explicit tests by creating a new "edits" test runner

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
52/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
testing, tooling

Research direction

Start by reviewing the current explicit tests and the existing spec test runner to understand their structure and editor setup. Define the document-based cases with input document, cursor position, key sequence, and expected toMarkdown() output, then run the complete new suite before removing only redundant old tests.

Written by the indexing model from the issue text.

Description

  • Create a document based on current tests that lists test cases as "the document used", "the cursor position in that document", "the sequence of keys pressed" and "the resulting document".
  • Create a test runner akin to the spec test runner that loads in that document, and then runs through each specified test case by loading up the editor, setting the content, setting the cursor, running the key sequence, and then verifying that .toMarkdown() matches the given result.
  • Do not consider this work done until all tests in this new document-based approach pass
  • Then, only After the new tests pass, may the old tests be deleted (this may required only deleting some tests inside test files, we cannot indiscriminately delete full files).
Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
9h 8m
Merged PRs (30d)
16

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Pomax/markdown-editor

All issues in Pomax/markdown-editor

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.