Skip to content

Commit

Permalink
use jest.mocked() in TS example
Browse files Browse the repository at this point in the history
  • Loading branch information
mrazauskas committed Aug 12, 2022
1 parent ff05715 commit 715c564
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/typescript/__tests__/calc.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Copyright (c) 2014-present, Facebook, Inc. All rights reserved.

import {jest} from '@jest/globals';

import Memory from '../memory';
import sub from '../sub';
import sum from '../sum';
Expand All @@ -9,7 +13,7 @@ jest.mock('../sum');

const mockSub = jest.mocked(sub);
const mockSum = jest.mocked(sum);
const MockMemory = Memory as jest.MockedClass<typeof Memory>;
const MockMemory = jest.mocked(Memory);

describe('calc - mocks', () => {
const memory = new MockMemory();
Expand Down

0 comments on commit 715c564

Please sign in to comment.