caveats: given that we do create a pacakge.json per every run, this will affect the speed of the suit. altho is not noticible now.
benefits: the paths to customPaths and customRulePathss are always absolute from the developer stand point, but this is solved by the helper providing the relative path to the location of the tempDirectory created. it also prevent us from having issues when 2+ tests need the same package.json like we saw in https://github.com/cjoudrey/graphql-schema-linter/pull/196
This solution could also be applied to rc_file and js_file respectively
I have the same solution with sinon. I can share it as well.
This PR provides a helper to create on the fly a
package.json
file with the desired options._this is the solution we discussed on https://github.com/cjoudrey/graphql-schema-linter/pull/196#discussion_r352382723_
customPaths
andcustomRulePaths
s are always absolute from the developer stand point, but this is solved by the helper providing the relative path to the location of thetempDirectory
created. it also prevent us from having issues when 2+ tests need the samepackage.json
like we saw in https://github.com/cjoudrey/graphql-schema-linter/pull/196This solution could also be applied to rc_file and js_file respectively
I have the same solution with sinon. I can share it as well.