Skip to content

Commit

Permalink
Fix typecheck
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Mar 29, 2024
1 parent 39f5253 commit d22d160
Show file tree
Hide file tree
Showing 15 changed files with 38 additions and 38 deletions.
4 changes: 2 additions & 2 deletions workflow_tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ const FILES_TO_COPY_INTO_TEST_REPO = [
];
beforeEach(async () => {
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testWorkflowsRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down Expand Up @@ -339,7 +339,7 @@ const FILES_TO_COPY_INTO_TEST_REPO = [
`beforeEach` gets executed before each test. Here we create the local test repository with the files defined in the `FILES_TO_COPY_INTO_TEST_REPO` variable. `testWorkflowRepo` is the name of the test repo and can be changed to whichever name you choose, just remember to use it later when accessing this repo. _Note that we can't use `beforeAll()` method, because while mocking steps `Act-js` modifies the workflow file copied into the test repo and thus mocking could persist between tests_
```javascript
beforeEach(async () => {
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testWorkflowsRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/authorChecklist.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/authorChecklistAssertions';
import mocks from './mocks/authorChecklistMocks';
Expand Down Expand Up @@ -30,7 +30,7 @@ describe('test workflow authorChecklist', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testAuthorChecklistWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/cherryPick.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/cherryPickAssertions';
import mocks from './mocks/cherryPickMocks';
Expand Down Expand Up @@ -29,7 +29,7 @@ describe('test workflow cherryPick', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testCherryPickWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/cla.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/naming-convention */
import type {Step} from '@kie/act-js';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import {assertCLAJobExecuted} from './assertions/claAssertions';
import {CLA__CLA__CHECK_MATCH__STEP_MOCKS, CLA__CLA__NO_MATCHES__STEP_MOCKS, CLA__CLA__RECHECK_MATCH__STEP_MOCKS} from './mocks/claMocks';
Expand Down Expand Up @@ -36,7 +36,7 @@ describe('test workflow cla', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testClaWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/createNewVersion.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/createNewVersionAssertions';
import mocks from './mocks/createNewVersionMocks';
Expand All @@ -25,7 +25,7 @@ describe('test workflow createNewVersion', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testCreateNewVersionWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/deploy.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/deployAssertions';
import mocks from './mocks/deployMocks';
Expand All @@ -25,7 +25,7 @@ describe('test workflow deploy', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testDeployWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/deployBlocker.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/deployBlockerAssertions';
import mocks from './mocks/deployBlockerMocks';
Expand Down Expand Up @@ -33,7 +33,7 @@ describe('test workflow deployBlocker', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testDeployBlockerWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/failureNotifier.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import * as kieMockGithub from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/failureNotifierAssertions';
import mocks from './mocks/failureNotifierMocks';
Expand All @@ -20,7 +20,7 @@ describe('test workflow failureNotifier', () => {
const actor = 'Dummy Actor';
beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testFailureNotifierWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/finishReleaseCycle.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/finishReleaseCycleAssertions';
import mocks from './mocks/finishReleaseCycleMocks';
Expand Down Expand Up @@ -26,7 +26,7 @@ describe('test workflow finishReleaseCycle', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testFinishReleaseCycleWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
4 changes: 2 additions & 2 deletions workflow_tests/lint.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as kieMockGithub from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/lintAssertions';
import mocks from './mocks/lintMocks';
Expand Down Expand Up @@ -28,7 +28,7 @@ describe('test workflow lint', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testLintWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/lockDeploys.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/lockDeploysAssertions';
import mocks from './mocks/lockDeploysMocks';
Expand Down Expand Up @@ -28,7 +28,7 @@ describe('test workflow lockDeploys', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testLockDeploysWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/platformDeploy.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/platformDeployAssertions';
import mocks from './mocks/platformDeployMocks';
Expand Down Expand Up @@ -29,7 +29,7 @@ describe('test workflow platformDeploy', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testPlatformDeployWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/preDeploy.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/preDeployAssertions';
import mocks from './mocks/preDeployMocks';
Expand Down Expand Up @@ -29,7 +29,7 @@ describe('test workflow preDeploy', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testPreDeployWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/reviewerChecklist.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/reviewerChecklistAssertions';
import mocks from './mocks/reviewerChecklistMocks';
Expand Down Expand Up @@ -31,7 +31,7 @@ describe('test workflow reviewerChecklist', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testReviewerChecklistWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down
6 changes: 3 additions & 3 deletions workflow_tests/test.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {MockStep} from '@kie/act-js/build/src/step-mocker/step-mocker.types';
import * as kieMockGithub from '@kie/mock-github';
import type {CreateRepositoryFile, MockGithub} from '@kie/mock-github';
import {MockGithub} from '@kie/mock-github';
import type {CreateRepositoryFile} from '@kie/mock-github';
import path from 'path';
import assertions from './assertions/testAssertions';
import mocks from './mocks/testMocks';
Expand Down Expand Up @@ -32,7 +32,7 @@ describe('test workflow test', () => {

beforeEach(async () => {
// create a local repository and copy required files
mockGithub = new kieMockGithub.MockGithub({
mockGithub = new MockGithub({
repo: {
testTestWorkflowRepo: {
files: FILES_TO_COPY_INTO_TEST_REPO,
Expand Down

0 comments on commit d22d160

Please sign in to comment.