allow jsx tests for coffee changes, fixes SD-1261
test plan: * test commit Change-Id: I9e3da787a56467c886d1e70f107b3abb916c6d1e Reviewed-on: https://gerrit.instructure.com/82842 Reviewed-by: Jon Jensen <jon@instructure.com> Product-Review: Jon Jensen <jon@instructure.com> QA-Review: Jon Jensen <jon@instructure.com> Tested-by: Jenkins
This commit is contained in:
parent
0e46247dfe
commit
31e90c0ce6
|
@ -84,10 +84,12 @@ module TatlTael
|
|||
end
|
||||
|
||||
COFFEE_SPEC_REGEX = /spec\/coffeescripts\//
|
||||
JSX_SPEC_REGEX = /spec\/(coffeescripts|javascripts)\/jsx\//
|
||||
def coffee_specs?
|
||||
changes.any? do |change|
|
||||
!change.deleted? &&
|
||||
change.path =~ COFFEE_SPEC_REGEX
|
||||
(change.path =~ COFFEE_SPEC_REGEX ||
|
||||
change.path =~ JSX_SPEC_REGEX)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -99,7 +101,6 @@ module TatlTael
|
|||
end
|
||||
end
|
||||
|
||||
JSX_SPEC_REGEX = /spec\/(coffeescripts|javascripts)\/jsx\//
|
||||
def jsx_specs?
|
||||
changes.any? do |change|
|
||||
!change.deleted? &&
|
||||
|
|
|
@ -79,6 +79,13 @@ describe TatlTael::Linter do
|
|||
[{ path: APP_COFFEE_BUNDLE_PATH, deleted?: false }],
|
||||
:ensure_coffee_specs
|
||||
end
|
||||
|
||||
context "with jsx spec changes" do
|
||||
include_examples "change combos",
|
||||
APP_COFFEE_PATH,
|
||||
JSX_SPEC_PATH,
|
||||
:ensure_coffee_specs
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ end
|
|||
|
||||
linter.ensure_coffee_specs do
|
||||
errors << "Your commit includes coffee changes,"\
|
||||
" but does not include coffee specs."\
|
||||
" but does not include coffee or jsx specs."\
|
||||
" Please add some to verify your changes."
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue