Skip to content

Commit 096f7fd

Browse files
authored
Merge pull request #301 from justinezahiri/fix/tests-next-generator
Fix/tests next generator
2 parents 5fa2922 + 0c21618 commit 096f7fd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ You can now hack in the cloned repository of `client-generator`. If you want to
3535

3636
### Testing your changes
3737

38+
To test your changes, generate a client in a `pwa` directory of an api-platform distribution:
39+
40+
```console
41+
$ git clean -df && NODE_TLS_REJECT_UNAUTHORIZED=0 <absolutePathOfYourClonedRepo>/lib/index.js https://localhost/ .
42+
```
43+
44+
and see the `pwa` logs:
45+
46+
```console
47+
$ docker-compose logs -f pwa
48+
```
49+
3850
Before sending a Pull Request, make sure the tests pass correctly:
3951

4052
```console

src/generators/NextGenerator.test.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,15 @@ describe("generate", () => {
4444
"/components/abc/Show.tsx",
4545
"/components/abc/Form.tsx",
4646
"/components/common/ReferenceLinks.tsx",
47+
"/components/common/Pagination.tsx",
4748
"/types/Abc.ts",
4849
"/types/Collection.ts",
4950
"/pages/abcs/[id]/index.tsx",
5051
"/pages/abcs/[id]/edit.tsx",
5152
"/pages/abcs/index.tsx",
5253
"/pages/abcs/create.tsx",
5354
"/utils/dataAccess.ts",
55+
"/utils/mercure.ts",
5456
].forEach((file) => expect(fs.existsSync(tmpobj.name + file)).toBe(true));
5557

5658
[

0 commit comments

Comments
 (0)