Skip to content

Commit

Permalink
test: first test regex path that was filtering out component jest tes…
Browse files Browse the repository at this point in the history
…ts (#482)

A recent change to the jest configuration caused only the tests in src/modules to be run.

As a result of this, some component test snapshots were no longer valid when the
new chip design was released.
  • Loading branch information
jenniferarnesen authored Jan 15, 2024
1 parent e7cf935 commit 27ffd7b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ module.exports = {
'\\.(css)$': 'identity-obj-proxy',
},
testRunner: 'jest-circus/runner',
testRegex: ['/src/modules/__tests__/.*.spec.js?$'],
testRegex: ['/src/(.*/)?__tests__/.*.spec.js?$'],
reporters: [
'default',
...(isReportPortalSetup ? [reportPortalConfig] : []),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ exports[`ChipBase Data element: 2 conditions 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
2
</span>
Expand Down Expand Up @@ -69,6 +70,7 @@ exports[`ChipBase Data element: TRUE_ONLY 1 condition 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
1
</span>
Expand Down Expand Up @@ -107,6 +109,7 @@ exports[`ChipBase Data element: TRUE_ONLY both selected 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
all
</span>
Expand Down Expand Up @@ -145,6 +148,7 @@ exports[`ChipBase Data element: TRUE_ONLY no conditions 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
all
</span>
Expand Down Expand Up @@ -180,6 +184,9 @@ exports[`ChipBase Data element: in stage with option set and 2 options chosen 1`
>
My data element
</span>
<span>
,
</span>
<span
class="secondary"
>
Expand All @@ -188,6 +195,7 @@ exports[`ChipBase Data element: in stage with option set and 2 options chosen 1`
</span>
<span
class="suffix"
data-test="chip-suffix"
>
2
</span>
Expand Down Expand Up @@ -226,6 +234,7 @@ exports[`ChipBase Data element: no conditions 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
all
</span>
Expand Down Expand Up @@ -264,6 +273,7 @@ exports[`ChipBase Data element: option set and 2 options chosen 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
2
</span>
Expand Down Expand Up @@ -302,6 +312,7 @@ exports[`ChipBase OU: 2 selected 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
2
</span>
Expand Down Expand Up @@ -338,7 +349,6 @@ exports[`ChipBase OU: none selected 1`] = `
Organsiation unit
</span>
</span>
</div>
</div>
`;
Expand Down Expand Up @@ -374,6 +384,7 @@ exports[`ChipBase Period: 1 selected 1`] = `
</span>
<span
class="suffix"
data-test="chip-suffix"
>
1
</span>
Expand Down Expand Up @@ -410,7 +421,6 @@ exports[`ChipBase Period: none selected 1`] = `
Event date (e2e)
</span>
</span>
</div>
</div>
`;

0 comments on commit 27ffd7b

Please sign in to comment.