-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove circular dependencies from tests
- Loading branch information
1 parent
c46506d
commit 8ee5f00
Showing
8 changed files
with
33 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 0 additions & 12 deletions
12
packages/scenes/src/components/SceneApp/__mocks__/@grafana/runtime.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
import '@testing-library/jest-dom'; | ||
|
||
import { matchers } from './test'; | ||
import { toEmitValues } from './test/toEmitValues'; | ||
import { toEmitValuesWith } from './test/toEmitValuesWith'; | ||
|
||
expect.extend(matchers); | ||
expect.extend({ | ||
toEmitValues, | ||
toEmitValuesWith, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
packages/scenes/utils/test/renderAppInsideRoutingWithStartingUrl.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react'; | ||
import { locationService } from '@grafana/runtime'; | ||
import { render } from '@testing-library/react'; | ||
import { SceneApp } from '../../src/components/SceneApp/SceneApp'; | ||
import { TestContextProviderBase } from './TestContextProvider'; | ||
|
||
export function renderAppInsideRouterWithStartingUrl(app: SceneApp, startingUrl: string) { | ||
locationService.push(startingUrl); | ||
|
||
return render( | ||
<TestContextProviderBase> | ||
<app.Component model={app} /> | ||
</TestContextProviderBase> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters