Skip to content

Commit

Permalink
docs(readme): add more info about the basic concepts
Browse files Browse the repository at this point in the history
  • Loading branch information
blablabla1234678 authored and vojtajina committed Feb 5, 2014
1 parent cee7aa8 commit e2e9902
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ _real_ browsers, powered by [Node.js] and [Socket.io].

## But I still want to use \_insert testing library\_

Karma is not a testing framework, neither an assertion library,
so for that you can use pretty much anything you like. Right now out
Karma is not a testing framework, neither an assertion library.
Karma just launches a HTTP server, and generates the test runner HTML file you probably already know from your favourite testing framework.
So for testing purposes you can use pretty much anything you like. Right now out
of the box there is support for

* [Mocha]
Expand All @@ -33,6 +34,9 @@ of the box there is support for
* \_anything else\_ Write your own adapter. It's not that hard. And we
are here to help.

If you want to use one or more frameworks with Karma, then please read the documentation of the related [adapters](https://github.com/karma-runner)!
It will help a lot about how to configure your project...


## Which Browsers can I use?

Expand Down Expand Up @@ -103,12 +107,21 @@ start Karma:
```bash
$ karma start
```
That command starts a HTTP server and connects it to one or more browser window. It creates a test runner HTML file as well.
The HTTP server configuration and the test runner is generated from your Karma configuration.
The `file patterns` in the Karma configuration are very important, because Karma creates HTML script elements
from the files matching a `file pattern` with short pattern syntax or `include` flag.
So these matching files will be included directly into the test runner HTML file.
If you want to use a _static file_ in your tests, then you have to turn off the `include` flag by its `file pattern`.

If you want to run tests manually (without auto watching file changes), you can:
```bash
$ karma run
```
But only if you have started the Karma server before.
By executing that command, Karma runs your test runner HTML file in the opened
browser window and sends back the results to your test reporter. Many reporters are supported, for example you can use the
[IntelliJ reporter](https://github.com/karma-runner/karma-intellij) for WebStorm.
You can of course create your own reporter if your want. Please let us know if you need any help!


## Why did you create this?
Expand Down

0 comments on commit e2e9902

Please sign in to comment.