From 9de97e41f7ccd448046ba72cb4b12956c8438ac0 Mon Sep 17 00:00:00 2001
From: "allcontributors[bot]"
<46447321+allcontributors[bot]@users.noreply.github.com>
Date: Tue, 12 Jan 2021 19:14:29 +0100
Subject: [PATCH 1/3] docs: add jbchr as a contributor (#178)
---
.all-contributorsrc | 10 ++++++++++
README.md | 38 ++++++++++++++++++++------------------
2 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/.all-contributorsrc b/.all-contributorsrc
index d32934f4..291aa0ce 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -168,6 +168,16 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "jbchr",
+ "name": "Janek",
+ "avatar_url": "https://avatars1.githubusercontent.com/u/23141806?v=4",
+ "profile": "https://github.com/jbchr",
+ "contributions": [
+ "code",
+ "test"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/README.md b/README.md
index 64dac4f5..0cb56cc9 100644
--- a/README.md
+++ b/README.md
@@ -185,32 +185,34 @@ Thanks goes to these people ([emoji key][emojis]):
-
+
+
This project follows the [all-contributors][all-contributors] specification.
From 142f7cf81ec8337e0a4a1cd4f159a4db8baa5116 Mon Sep 17 00:00:00 2001
From: Nick McCurdy
Date: Tue, 19 Jan 2021 19:43:41 -0500
Subject: [PATCH 2/3] docs: use vanity URL for Discord
---
README.md | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 0cb56cc9..79538b8b 100644
--- a/README.md
+++ b/README.md
@@ -226,6 +226,7 @@ Contributions of any kind welcome!
## FAQ
##### I am using Reactive Forms and the `jest-dom` matcher `toHaveFormValues` always returns an empty object or there are missing fields. Why?
+
Only form elements with a `name` attribute will have their values passed to `toHaveFormsValues`.
## Issues
@@ -275,7 +276,7 @@ Links:
[downloads-badge]: https://img.shields.io/npm/dm/@testing-library/angular.svg?style=flat-square
[npmtrends]: http://www.npmtrends.com/@testing-library/angular
[discord-badge]: https://img.shields.io/discord/723559267868737556.svg?color=7389D8&labelColor=6A7EC2&logo=discord&logoColor=ffffff&style=flat-square
-[discord]: https://discord.gg/c6JN9fM
+[discord]: https://discord.gg/testing-library
[license-badge]: https://img.shields.io/npm/l/@testing-library/angular.svg?style=flat-square
[license]: https://github.com/testing-library/angular-testing-library/blob/master/LICENSE
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
From 1672764544c79ed700038bcde6b91bc5dcc00c6a Mon Sep 17 00:00:00 2001
From: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Date: Mon, 1 Feb 2021 18:34:16 +0100
Subject: [PATCH 3/3] fix: fallback to TestBed.get (#183)
---
projects/testing-library/src/lib/testing-library.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/testing-library/src/lib/testing-library.ts b/projects/testing-library/src/lib/testing-library.ts
index 66631dc8..77e275ef 100644
--- a/projects/testing-library/src/lib/testing-library.ts
+++ b/projects/testing-library/src/lib/testing-library.ts
@@ -26,6 +26,7 @@ import { RenderComponentOptions, RenderDirectiveOptions, RenderResult } from './
import { getConfig } from './config';
const mountedFixtures = new Set>();
+const inject = TestBed.inject || TestBed.get;
export async function render(
component: Type,
@@ -129,7 +130,6 @@ export async function render(
fixture.componentRef.injector.get(ChangeDetectorRef).detectChanges();
};
- const inject = TestBed.inject || TestBed.get;
let router = routes ? inject(Router) : null;
const zone = inject(NgZone);
const navigate = async (elementOrPath: Element | string, basePath = '') => {
@@ -185,7 +185,7 @@ export async function render(
async function createComponent(component: Type): Promise> {
/* Make sure angular application is initialized before creating component */
- await TestBed.inject(ApplicationInitStatus).donePromise;
+ await inject(ApplicationInitStatus).donePromise;
return TestBed.createComponent(component);
}