Skip to content

Commit

Permalink
Merge pull request #45 from pulsar-edit/no-brittle-tests
Browse files Browse the repository at this point in the history
Improve test reproducibility + Decaffeinate
  • Loading branch information
confused-Techie authored Sep 5, 2022
2 parents fd9d8c3 + 7b6aedb commit d36c898
Show file tree
Hide file tree
Showing 11 changed files with 889 additions and 702 deletions.
2 changes: 2 additions & 0 deletions docs/Building.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ yarn build
yarn build:apm
```

_If a Windows user it is recommended to install Pulsar on a path with no Spaces_

This will install the packages, rebuild them for Electron, and build the Atom Package
Manager. Finally, you can run the editor with `yarn start`. This command will accept the
same arguments as the final binary.
Expand Down
29 changes: 29 additions & 0 deletions docs/dev/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Testing in Pulsar

Testing is an important aspect of any large code-base. Pulsar has a suite of exhaustive tests built into the core of the editor located in `./spec`.

There is also the ability to tests packages built right into the editor, which will find all test suites within the `./packages` folders.

## Core Testing

To run the editor test suite run `yarn start --test spec`.

Running this command uses `yarn` to run the `start` script within `package.json`. The start script starts up Pulsar using `electron` and passes the additional arguments to Pulsar.

At this point as the editor starts up it continuously checks its CLI arguments.

The testing framework to use to run the tests is determined in `./src/atom-application.js` by the `resolveTestRunnerPath` script, which will use the test specified by the package itself, or otherwise will default to the legacy test runner, of which is `./spec/jasmine-test-runner.js`.

Other test runners can be specified within a packages `package.json` like so:

```json
"atomTestRunner": "./test/runner"
```

This will then use whatever test runner is located in that file location, which commonly is used as `atom-mocha-test-runner`, which uses the alternate test runner located in `spec/main-process/mocha-test-runner.js`.

Otherwise once the test runner is determined later on in the application the tests are started via `./src/initialize-test-window.js` that starts the testing process itself.

## Package Testing

*More Information Needed*
317 changes: 0 additions & 317 deletions spec/atom-reporter.coffee

This file was deleted.

Loading

0 comments on commit d36c898

Please sign in to comment.