bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
331 stars 85 forks source link

Resolve issues with nx-electron generator unit tests #233

Closed WillPoulson closed 1 year ago

WillPoulson commented 1 year ago

Hi @bennymeg

Whilst doing my last PR I noticed most the unit tests were all falling over so I thought I'd try put a dent in some of them.

This PR mainly sorts out generator.spec.ts for the nx-electron generator. - Be sure to expand it as GH has collapsed the file changes. The rest of the changes are either formatting or attempting to make a dent in the other specs without much luck. Ideally the next big stride would be to get the executor tests all passing but I wasn't able to crack mocking the right bits.

Hopefully the test cases I've added should help clarify what parts of the generator are/aren't working anymore.

Screenshot 2023-08-02 at 09 56 37

FYI

During this refactor I noticed that the tags option currently isn't working. I've included the test case commented out for when we want to re-implement this functionality.

Also when merging from develop yesterday and changing the sourceRoot. It seems to have broken my :make command on my test app. I've gotten around it by passing --sourceRoot=dist/apps for now 👍 Just thought I'd highlight

bennymeg commented 1 year ago

Thanks!