Skip to content

Commit fd8e7be

Browse files
committed
test: 💍 (optimize-imports) fix failing tests
1 parent 12d83ce commit fd8e7be

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

__tests__/optimize-imports-mocks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export const emptyNewLineSeparator: TestCase = {
107107
108108
import { AboutDialogBloc, AboutState } from './about-dialog.bloc';`,
109109
expected: `import { Component, HostListener } from '@angular/core';
110-
import { Observable } from 'rxjs';
111110
import { MatDialogRef } from '@angular/material/dialog';
111+
import { Observable } from 'rxjs';
112112
import { AboutDialogBloc, AboutState } from './about-dialog.bloc';`,
113113
};

__tests__/optimize-imports.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { readmeExample, comments, TestCase, codeBetweenImports, emptyNewLineSepa
66
import { defaultConfig } from '@ic/defaultConfig';
77

88
jest.mock('fs');
9+
jest.mock('simple-git');
910

1011
describe('optimizeImports', () => {
1112
const basicConfig: Config = {
@@ -49,7 +50,7 @@ describe('optimizeImports', () => {
4950
await assertConductor(codeBetweenImports);
5051
});
5152

52-
it('should work empty new line separator', async () => {
53+
it('should give you an error if you import something that is not installed', async () => {
5354
spy.and.returnValue({ ...basicConfig, separator: '' });
5455
await assertConductor(emptyNewLineSeparator);
5556
});

0 commit comments

Comments
 (0)