Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use real mockProject for test runs instead of virtual empty project #57

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ksjogo
Copy link
Contributor

@ksjogo ksjogo commented Dec 16, 2021

Windows will be fixed with #82
So let's wait for that to go green.
But can be reviewed now.

@ksjogo ksjogo changed the title [DRAFT] Use dummy project for test runs instead of mock project [draft] Use dummy project for test runs instead of mock project Dec 17, 2021
@ksjogo ksjogo marked this pull request as draft December 17, 2021 16:51
@ksjogo ksjogo changed the title [draft] Use dummy project for test runs instead of mock project Use dummy project for test runs instead of mock project Dec 17, 2021
Copy link
Owner

@johnfn johnfn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great. My only real concern is that the tests continue to run nice and snappy like they did before. If they do then I'm excited to land this!

Overall nit is that "dummy" could probably be renamed something a bit more descriptive, like "testEnvironment" or something.

README.md Outdated Show resolved Hide resolved
@ksjogo ksjogo force-pushed the test-real-project branch 5 times, most recently from 40034c8 to 2c0ee9d Compare December 26, 2021 19:46
@ksjogo
Copy link
Contributor Author

ksjogo commented Dec 26, 2021

All tests run fine now.
On my machine total testing changed from ~1.95s to ~2.1s, which for me is acceptable.
Can probably optimise some IO for tests, if we would like to (or run in parallel without global).

@ksjogo ksjogo marked this pull request as ready for review December 26, 2021 20:09
@ksjogo ksjogo marked this pull request as draft December 26, 2021 20:19
This was referenced Dec 27, 2021
@johnfn
Copy link
Owner

johnfn commented Jan 8, 2022

This is fantastic. Can't wait to finally test asset generation.

@ksjogo ksjogo marked this pull request as ready for review January 9, 2022 16:23
@ksjogo ksjogo changed the title Use dummy project for test runs instead of mock project Use real mockProject for test runs instead of virtual empty project Jan 9, 2022
@ksjogo ksjogo force-pushed the test-real-project branch 2 times, most recently from 04b5966 to 222d9d0 Compare January 9, 2022 16:43
@ksjogo
Copy link
Contributor Author

ksjogo commented Jan 9, 2022

This one is reviewable now. Windows tests will be fixed in the windows mr (or i can merge these two, but that would go out of hand).

@@ -0,0 +1,6 @@
// this file will have dynamic content from our test infrastructure
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing nit: "This file will be written to by ts2gd's tests."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well yes, but no. We have it here so that the fs can see it but the tests aren't writing to it. (We return different content to tsc).

@johnfn
Copy link
Owner

johnfn commented Jan 18, 2022

This is awesome. Sorry it took me a few days to get to this - somehow I totally missed your message.

It looks like it's failing CI though?

@ksjogo
Copy link
Contributor Author

ksjogo commented Jan 18, 2022

Yeah, as the path handling is broken on Windows. (Which wasn't triggered before without the real project).
That is fixed in the Windows PR, but that would make this even bigger).
If you want green merges, you could review both, then we merge windows fixes into this one and then merge this one.

@ksjogo
Copy link
Contributor Author

ksjogo commented Jan 31, 2022

Any thoughts here?

@johnfn
Copy link
Owner

johnfn commented Feb 7, 2022

Sorry for disappearing for a little here - I got super busy. I'll merge this in soon. :)

@ksjogo
Copy link
Contributor Author

ksjogo commented Feb 7, 2022

No worries, will need the trifecta with some more changes for a work project end of month and might need to keep further changes bundled to get me there in time. We can try to unwrap after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants