Skip to content

Commit

Permalink
(chore): format files
Browse files Browse the repository at this point in the history
  • Loading branch information
fooddilsn committed Apr 3, 2023
1 parent 49189e1 commit 9406413
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
10 changes: 4 additions & 6 deletions apps/foo/__mocks__/sample.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { Mock, vi } from 'vitest';
import { Mock, vi } from 'vitest'

export const main: Mock = vi.fn().mockImplementation(() => {
console.log('Fake implementation');
return false;
});


console.log('Fake implementation')
return false
})
10 changes: 5 additions & 5 deletions apps/foo/src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { expect, test, vi } from 'vitest';
import { expect, test, vi } from 'vitest'

import { app } from './index';
import { app } from './index'

vi.mock('sample');
vi.mock('sample')

test('should use a mocked dependency', () => {
expect(app()).toBe(false);
});
expect(app()).toBe(false)
})
4 changes: 2 additions & 2 deletions apps/foo/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { main } from 'sample';
import { main } from 'sample'

export function app() {
return main();
return main()
}
8 changes: 4 additions & 4 deletions packages/sample/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function main() {
console.log('Real implementation');
return true;
}
export function main() {
console.log('Real implementation')
return true
}

0 comments on commit 9406413

Please sign in to comment.