-
Notifications
You must be signed in to change notification settings - Fork 8
Conversation
@@ -63,58 +63,60 @@ describe("Fluent API and Service instantiation tests", () => { | |||
|
|||
it("Store with existing path does not throw", () => { | |||
const store = stateFacadeFactory(PetStoreWithPseudoResponses); | |||
store.petstore(); // Should pass | |||
store.petstore({}); // Should pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why didn't this throw an error before if store.petstore()
does not make sense? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it just to fix the type hinting, behind the scenes an empty object is treated the same as undefined object (no-op). Not sure if it should throw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I don't understand what there was to "fix" if users can anyway do either 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, just wondering why tsc
compiled if it's wrong, maybe we don't even do type checking for the test files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, we use npm ci
in CI, which implicitly calls postinstall
, which calls compile
😇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, if compiling test and source code happen in the same step I sure hope lerna hows to keep the build clean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's taken care of by tsc --build tsconfig.test.json --clean
, which removes the compiled test files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'm still so suspicious that I'll probably have to test adding a type check error in the test files and see what happens myself but this PR is of course very good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I just noticed I forgot the update to package.json
, so that clarifies all this confusion hopefully. 🤦♂️ My bad.
Codecov Report
@@ Coverage Diff @@
## dev #102 +/- ##
=========================================
+ Coverage 83.8% 84.15% +0.35%
=========================================
Files 32 32
Lines 1142 1142
Branches 259 260 +1
=========================================
+ Hits 957 961 +4
+ Misses 185 181 -4
Continue to review full report at Codecov.
|
responseCreatorFactory
to use the new types from Adds typing for state store #99matcher
to replace server path prefix fully and not by partial match. Error rose when trying to set state for path/api.test
when the server prefix is/api
. Instead of replacing/api
with the empty string, replaces/api/
with/
instead.