| author | ymh <ymh.work@gmail.com> |
| Sat, 07 May 2016 15:15:01 +0200 | |
| changeset 159 | dd4ee1d4122c |
| parent 136 | 5fed7e1716c2 |
| child 406 | cf0f23803a53 |
| permissions | -rw-r--r-- |
|
127
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
import { module } from 'qunit'; |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
import startApp from '../helpers/start-app'; |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
import destroyApp from '../helpers/destroy-app'; |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
|
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
export default function(name, options = {}) { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
6 |
module(name, { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
7 |
beforeEach() { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
8 |
this.application = startApp(); |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
|
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
if (options.beforeEach) { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
options.beforeEach.apply(this, arguments); |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
} |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
}, |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
14 |
|
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
afterEach() { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
if (options.afterEach) { |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
17 |
options.afterEach.apply(this, arguments); |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
18 |
} |
| 136 | 19 |
|
20 |
destroyApp(this.application); |
|
|
127
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
} |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
}); |
|
5cd8c3065c38
extract common functionalities to common module. First application to lexvo name resolving
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
23 |
} |