/
error.feature
38 lines (37 loc) · 1023 Bytes
/
error.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Feature: Error Display
In order to use Karma
As a person who wants to write great tests
I want Karma to log errors
Scenario: Syntax Error in a test file
Given a configuration with:
"""
files = ['error/test.js', 'error/under-test.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-jasmine',
'karma-chrome-launcher'
];
"""
When I start Karma
Then it fails with:
"""
SyntaxError: Unexpected token }
"""
Scenario: Single-run Syntax Error in a test file
Given a configuration with:
"""
files = ['error/test.js', 'error/under-test.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-jasmine',
'karma-chrome-launcher'
];
singleRun = false;
"""
When I monitor Karma
And I stop when the log contains 'SyntaxError'
Then it fails with like:
"""
SyntaxError: Unexpected token }
"""
And I stop a server programmatically