INS-1785: Add Inso NPM package test
This changeset adds a test to catch a previous regression involving the built version of the Inso package. I've confirmed that it fails for the previous behavior, and succeeds for the current fixed behavior.
@filfreire I think it may be best to restrict the scope here to test just the final build output before it goes to npm in order to keep the complexity down. @davidfluck-kong I am curious to see some description of the exact difference is between this test and the smoke test we have in app.test.ts. If we have this do we still need that test? reference:
describe('run test', () => {
it('should not fail running tests', () => {
const { failed } = inso(
'run',
'test',
srcInsoNedb,
['--env', 'Dev'],
'Echo Test Suite',
'--verbose',
);
expect(failed).toBe(false);
});
});
@jackkav My understanding is that whatever is in app.test.ts runs too late in the process and tests the packaged binary and not the NPM package itself. My goal was to do the simplest possible test that positively identified the bug. It could certainly run from elsewhere, and I'm happy if folks want to push changes to the branch to try to accomplish that.
I don't know. I wanted to do the simplest thing I could to exercise the behavior.