Skip to content

Commit

Permalink
Configure prettier v2 just for jest, update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
robatron committed Feb 28, 2024
1 parent 2f19d6a commit 7ff4828
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 86 deletions.
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ module.exports = {
// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: ['clover', 'json', 'lcov', 'text', 'text-summary'],

// Force jest to use a downgraded version of prettier
// See https://github.com/jestjs/jest/issues/14305
prettierPath: require.resolve('prettier-2'),

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,

Expand Down
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"gulp-cli": "^2.3.0",
"jest": "^29.7.0",
"prettier": "^3.2.5",
"prettier-2": "npm:prettier@^2",
"uuid": "^8.3.1"
},
"dependencies": {
Expand Down
98 changes: 49 additions & 49 deletions src/__tests__/__snapshots__/index.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`createTaskTree builds a task tree from definition 1`] = `
Object {
"default": Object {
{
"default": {
"asyncType": "series",
"displayName": "default",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "installPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "runPhase:subInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
Object {
{
"asyncType": "parallel",
"displayName": "verifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -75,10 +75,10 @@ Object {
},
],
},
"installPhase": Object {
"installPhase": {
"asyncType": "series",
"displayName": "installPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -87,58 +87,58 @@ Object {
"installPhase:alpha": [Function],
"installPhase:bravo": [Function],
"installPhase:charlie": [Function],
"runPhase": Object {
"runPhase": {
"asyncType": "series",
"displayName": "runPhase",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "runPhase:subInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
"runPhase:subInstallPhase": Object {
"runPhase:subInstallPhase": {
"asyncType": "series",
"displayName": "runPhase:subInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -147,34 +147,34 @@ Object {
"runPhase:subInstallPhase:delta": [Function],
"runPhase:subInstallPhase:echo": [Function],
"runPhase:subInstallPhase:foxtrot": [Function],
"runPhase:subRunPhase": Object {
"runPhase:subRunPhase": {
"asyncType": "series",
"displayName": "runPhase:subRunPhase",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
"runPhase:subRunPhase:subSubInstallPhase": Object {
"runPhase:subRunPhase:subSubInstallPhase": {
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubInstallPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -183,10 +183,10 @@ Object {
"runPhase:subRunPhase:subSubInstallPhase:golf": [Function],
"runPhase:subRunPhase:subSubInstallPhase:hotel": [Function],
"runPhase:subRunPhase:subSubInstallPhase:india": [Function],
"runPhase:subRunPhase:subSubVerifyPhase": Object {
"runPhase:subRunPhase:subSubVerifyPhase": {
"asyncType": "series",
"displayName": "runPhase:subRunPhase:subSubVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -195,10 +195,10 @@ Object {
"runPhase:subRunPhase:subSubVerifyPhase:juliett": [Function],
"runPhase:subRunPhase:subSubVerifyPhase:kelo": [Function],
"runPhase:subRunPhase:subSubVerifyPhase:lima": [Function],
"runPhase:subVerifyPhase": Object {
"runPhase:subVerifyPhase": {
"asyncType": "series",
"displayName": "runPhase:subVerifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -207,10 +207,10 @@ Object {
"runPhase:subVerifyPhase:mike": [Function],
"runPhase:subVerifyPhase:november": [Function],
"runPhase:subVerifyPhase:oscar": [Function],
"verifyPhase": Object {
"verifyPhase": {
"asyncType": "parallel",
"displayName": "verifyPhase",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand Down
30 changes: 15 additions & 15 deletions src/__tests__/__snapshots__/taskUtils.test.js.snap
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`createPhaseTask creates tasks for INSTALL_PACKAGES action 1`] = `
Object {
"testPhaseName": Object {
{
"testPhaseName": {
"asyncType": "series",
"displayName": "testPhaseName",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -18,35 +18,35 @@ Object {
`;

exports[`createPhaseTask creates tasks for RUN_PHASES action 1`] = `
Object {
"testPhaseName": Object {
{
"testPhaseName": {
"asyncType": "series",
"displayName": "testPhaseName",
"tasks": Array [
Object {
"tasks": [
{
"asyncType": "series",
"displayName": "testPhaseName:testPhaseName",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
Object {
{
"asyncType": "series",
"displayName": "testPhaseName:testPhaseName",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
],
},
],
},
"testPhaseName:testPhaseName": Object {
"testPhaseName:testPhaseName": {
"asyncType": "series",
"displayName": "testPhaseName:testPhaseName",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand All @@ -59,11 +59,11 @@ Object {
`;

exports[`createPhaseTask creates tasks for VERIFY_PACKAGES action 1`] = `
Object {
"testPhaseName": Object {
{
"testPhaseName": {
"asyncType": "series",
"displayName": "testPhaseName",
"tasks": Array [
"tasks": [
"task-fn",
"task-fn",
"task-fn",
Expand Down
Loading

0 comments on commit 7ff4828

Please sign in to comment.