Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
julienw committed Feb 19, 2019
1 parent 2614b04 commit 2210de8
Show file tree
Hide file tree
Showing 7 changed files with 1,459 additions and 848 deletions.
11 changes: 7 additions & 4 deletions src/test/components/NetworkChart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,18 @@ import mockCanvasContext from '../fixtures/mocks/canvas-context';
import { storeWithProfile } from '../fixtures/stores';
import {
getProfileWithMarkers,
getNetworkMarker,
getNetworkMarkers,
} from '../fixtures/profiles/processed-profile';
import { getBoundingBox } from '../fixtures/utils';
import mockRaf from '../fixtures/mocks/request-animation-frame';
import { type NetworkPayload } from '../../types/markers';

const NETWORK_MARKERS = Array(10)
.fill()
.map((_, i) => getNetworkMarker(3 + 0.1 * i, i));
const NETWORK_MARKERS = (function() {
const arrayOfNetworkMarkers = Array(10)
.fill()
.map((_, i) => getNetworkMarkers(3 + 0.1 * i, i));
return [].concat(...arrayOfNetworkMarkers);
})();

function setupWithProfile(profile) {
const flushRafCalls = mockRaf();
Expand Down
Loading

0 comments on commit 2210de8

Please sign in to comment.