-
Notifications
You must be signed in to change notification settings - Fork 175
/
Copy pathTiltfile
32 lines (29 loc) · 1.24 KB
/
Tiltfile
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
load('../Tiltfile', 'test_jest_yarn')
config.define_string_list('args', args=True)
cfg = config.parse()
args = cfg.get('args', [])
if len(args) != 1:
fail('expect this test Tiltfile to be run with exactly one arg')
arg = args[0]
if arg == 'no-install':
test_jest_yarn('tests', './fake_project_yarn/src/')
elif arg == 'explicit-deps':
test_jest_yarn('tests', './fake_project_yarn/',
deps=['fake_project_yarn/src/foo.js', 'fake_project_yarn/src/bar.js'])
elif arg == 'extra-args':
test_jest_yarn('tests', './fake_project_yarn/src',
extra_args=['foo.js', 'bar.js'])
elif arg == 'install-with-project-root':
test_jest_yarn('tests', './fake_project_yarn/src/',
with_install=True, project_root='./fake_project_yarn')
elif arg == 'install-without-project-root':
test_jest_yarn('tests', './fake_project_yarn/src/',
with_install=True)
elif arg == 'set-trigger-mode-via-kwargs':
test_jest_yarn('tests', './fake_project_yarn/src/',
trigger_mode=TRIGGER_MODE_MANUAL)
elif arg == 'run-all-tests':
test_jest_yarn('tests', './fake_project_yarn/src/',
only_changed=False)
else:
fail('unrecognized arg: {}'.format(arg))