From d00878a13db074fdac58c0f9484ef5d24ed55264 Mon Sep 17 00:00:00 2001 From: Arman Ozak Date: Fri, 15 Jan 2021 13:11:23 +0300 Subject: [PATCH] use js instead of ts for highlighting code --- docs/en/UI/Angular/Testing.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/en/UI/Angular/Testing.md b/docs/en/UI/Angular/Testing.md index 7b93d48585..509fbefe95 100644 --- a/docs/en/UI/Angular/Testing.md +++ b/docs/en/UI/Angular/Testing.md @@ -10,7 +10,7 @@ In Angular, unit tests use [Karma](https://karma-runner.github.io/) and [Jasmine An over-simplified spec file looks like this: -```ts +```js import { CoreTestingModule } from "@abp/ng.core/testing"; import { ThemeBasicTestingModule } from "@abp/ng.theme.basic/testing"; import { ThemeSharedTestingModule } from "@abp/ng.theme.shared/testing"; @@ -59,7 +59,7 @@ Although you can test your code with Angular TestBed, you may find [Angular Test The simple example above can be written with Angular Testing Library as follows: -```ts +```js import { CoreTestingModule } from "@abp/ng.core/testing"; import { ThemeBasicTestingModule } from "@abp/ng.theme.basic/testing"; import { ThemeSharedTestingModule } from "@abp/ng.theme.shared/testing"; @@ -95,7 +95,7 @@ describe("MyComponent", () => { Very similar, as you can see. The real difference kicks in when we use queries and fire events. -```ts +```js // other imports import { getByLabelText, screen } from "@testing-library/angular"; import userEvent from "@testing-library/user-event"; @@ -131,7 +131,7 @@ One thing to remember is that Karma runs tests in real browser instances. That m We have prepared a simple function with which you can clear any leftover DOM elements after each test. -```ts +```js // other imports import { clearPage } from "@abp/ng.core/testing"; @@ -159,7 +159,7 @@ Some components, modals, in particular, work off-detection-cycle. In other words For this purpose, we have prepared a `wait` function. -```ts +```js // other imports import { wait } from "@abp/ng.core/testing"; @@ -187,7 +187,7 @@ The `wait` function takes a second parameter, i.e. timeout (default: `0`). Try n Here is an example test suite. It doesn't cover all, but gives quite a good idea about what the testing experience will be like. -```ts +```js import { clearPage, CoreTestingModule, wait } from "@abp/ng.core/testing"; import { ThemeBasicTestingModule } from "@abp/ng.theme.basic/testing"; import { ThemeSharedTestingModule } from "@abp/ng.theme.shared/testing";