-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
proxy.feature
64 lines (61 loc) · 1.4 KB
/
proxy.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Feature: Proxying
In order to use Karma
As a person who wants to write great tests
I want to Karma to proxy requests.
Scenario: Simple file proxy
Given a configuration with:
"""
files = ['proxy/test.js', 'proxy/foo.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-jasmine',
'karma-chrome-launcher'
];
proxies = {
'/foo.js': '/base/proxy/foo.js'
}
"""
When I start Karma
Then it passes with:
"""
.
Chrome Headless
"""
Scenario: Added by a framework
Given a configuration with:
"""
files = ['proxy/test.js', 'proxy/foo.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-jasmine',
'karma-chrome-launcher',
_resolve('proxy/plugin')
];
frameworks = ['jasmine', 'foo']
"""
When I start Karma
Then it passes with:
"""
.
Chrome Headless
"""
Scenario: URLRoot
Given a configuration with:
"""
files = ['proxy/test.js', 'proxy/foo.js'];
browsers = ['ChromeHeadlessNoSandbox'];
plugins = [
'karma-jasmine',
'karma-chrome-launcher'
];
urlRoot = '/__karma__/';
proxies = {
'/foo.js': '/base/proxy/foo.js'
}
"""
When I start Karma
Then it passes with:
"""
.
Chrome Headless
"""