Comments (7)
I think there is perhaps a mixup of a couple different things here.
Karma is a test runner for JavaScript, but more precisely it runs tests in a browser.
So while a test harness is probably a good idea, going all the way to browser testing
is perhaps too far for an initial step.
@cdiggins If you are interested in some better testing tools have a look at some of the following.
- Mocha - https://mochajs.org/
- Jest - https://facebook.github.io/jest/
- Eva - https://github.com/avajs/ava
I only have experience with Mocha and afaik it is the only one compatible with running tests
in browsers via a karma plugin, this is a major advantage as it enables running tests
on Cloud Based testing services (sauceLabs) on multiple browsers.
However, browser testing is a pain to setup and get working initially so I would not start with that 😄
Eva and Jest are newer testing frameworks which should have fancier features
(parallel testing, testing only code that could be affected for quick feedback, ...)
So if browser testing is less relevant perhaps start by checking out their features.
anyhow a more modern testing framework is recommended 😄
instead of writing your own test runner as they will provide
better reporting, code coverage tools, automatic running in the background, CLI tools
and more...
from myna-parser.
Christopher already has QUnit tests (https://github.com/cdiggins/myna-parser/blob/master/tests/qunit.html), refactoring for karma is a step towards command line test automation. I have started on automation and I'll provide a pull if I have further grammars I need testing.
from myna-parser.
I used to use Mocha to test on the command-line along with Instanbul to do code-coverage. At one point I thought it just complicated things, so I removed it. I could put it back.
from myna-parser.
I just re-added Mocha tests. This way we can run the same tests from both from the command-line or from QUnit.html. Hope this addresses this issue. Let me know if there is a good reason to prefer Karma to Mocha for Myna.
from myna-parser.
Mocha is great. I'm getting a tsc build error I'll have to check.
myna.ts(859,64): error TS2304: Cannot find name 'console'.
from myna-parser.
Let me know if there is a good reason to prefer Karma to Mocha for Myna.
These are not mutually exclusive, Karma can be used for running the mocha tests in
a browser it does not replace it.
from myna-parser.
@Sciumo if you install Myna using npm and run "npm test" does it work? It should not engage the TypeScript compiler.
from myna-parser.
Related Issues (20)
- explainjs listed as dependency
- Possible performance degradation under Chrome Canary 61 HOT 2
- Possible performance improvements HOT 2
- Add return types to standalone functions
- 2.4.0 no longer works in the browser. HOT 8
- Case insensitive keywords? HOT 5
- Myna module improperly exported
- Error recovery and continuation
- 2 small mistakes in the sample code in readme.md
- typescript declaration file absent
- Sample Usage of Myna in TypeScript HOT 7
- ParserError messages don't seem to be propogated HOT 3
- Question: how to check in sequence if there is a whitespace + symbol
- Example in the README file does not work out of the box.
- Question on requirements for the programing language you are working on. HOT 5
- How to *use* ? HOT 7
- delay() rule ID number changes each time HOT 4
- Create railroad diagrams HOT 4
- Add Myna to JavaScript performance benchmarks HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myna-parser.