insomnia icon indicating copy to clipboard operation
insomnia copied to clipboard

INS-1785: Add Inso NPM package test

Open davidfluck-kong opened this issue 3 years ago • 1 comments

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.

davidfluck-kong avatar Aug 29 '22 05:08 davidfluck-kong

@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 avatar Sep 06 '22 08:09 jackkav

@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.

davidfluck-kong avatar Sep 28 '22 15:09 davidfluck-kong

I don't know. I wanted to do the simplest thing I could to exercise the behavior.

davidfluck-kong avatar Oct 12 '22 15:10 davidfluck-kong