1 | # Development
|
2 |
|
3 | ## Getting started
|
4 |
|
5 | Clone the repository and install the developer dependencies:
|
6 |
|
7 | ```
|
8 | git clone git://github.com/sunesimonsen/unexpected.git unexpected
|
9 | cd unexpected && npm install
|
10 | ```
|
11 |
|
12 | ## Source files
|
13 |
|
14 | * *lib/index.js*:<br>
|
15 | The entry point for the library.
|
16 | * *lib/Unexpected.js*:<br>
|
17 | The core of the library.
|
18 | * *lib/Assertion.js*:<br>
|
19 | The class that assertions are instantiated from.
|
20 | * *lib/utils.js*:<br>
|
21 | Utility functions
|
22 | * *lib/styles.js*:<br>
|
23 | MagicPen styles for controling the output.
|
24 | * *lib/types.js*:<br>
|
25 | Type definitions for every type Unexpected understands.
|
26 | * *lib/assertions.js*:<br>
|
27 | All assertions that is included in the core library.
|
28 |
|
29 | ## Running tests in the console
|
30 |
|
31 | ```
|
32 | make test
|
33 | make test-phantomjs
|
34 | ```
|
35 |
|
36 | ## Running tests in the browser
|
37 |
|
38 | ```
|
39 | make test-browser
|
40 | ```
|
41 |
|
42 | ## Coverage report
|
43 |
|
44 | ```
|
45 | make coverage
|
46 | ```
|
47 |
|
48 | ## Build a new release
|
49 |
|
50 | Make sure that you have commited all changes before making the release.
|
51 |
|
52 | The following make-targets will build the production version of _unexpected_,
|
53 | commit the generated file and tag a new version using NPM.
|
54 |
|
55 | ### Patch release
|
56 | make release patch
|
57 |
|
58 | ### Minor release
|
59 | make release minor
|
60 |
|
61 | ### Major release
|
62 | make release major
|