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

Source is not transpiled to lib/ when running tests #2541

Closed
ricardograca opened this issue Mar 24, 2018 · 7 comments
Closed

Source is not transpiled to lib/ when running tests #2541

ricardograca opened this issue Mar 24, 2018 · 7 comments

Comments

@ricardograca
Copy link
Member

Environment

Knex version: 0.14.4
Database + version: Not relevant
OS: Ubuntu 16.04.4

Bug

Running the test suite doesn't automatically transpile src/ to lib/ even though the Contributing document says that it should:

Make changes in the /src directory and run npm run babel (runs once and then quits) or npm run dev (runs once and then watches for changes) to update the files in /lib. npm test will also do this.

Looking at the test script in package.json it looks like it just calls the pre-test script which simply runs the linter and not the babel compiler.

Steps to reproduce

  1. Clone the repo
  2. npm install
  3. Change some file in src so that a test would fail
  4. npm test

Expected results

The changes made to the file in src make the test suite fail.

Actual results

The test suite completes successfully because the changes are not being transpiled to lib.

Missing / erroneus documentation

This could also be a case of incorrect documentation.

@elhigu
Copy link
Member

elhigu commented Mar 24, 2018

Yes, this is bug or incorrect docs. I always run npm run build && npm test when developing.

@ricardograca
Copy link
Member Author

Is there any problem with updating the script in package.json to run the build process before testing?

@elhigu
Copy link
Member

elhigu commented Mar 24, 2018

I think that should be eay to go. Running tests without build should separated to own script. Probably test is not doing build because some people are using build-watch for the code and then just running tests without building vode separately.

@elhigu
Copy link
Member

elhigu commented Mar 24, 2018

And I really cant write properly with touch screen 😅

@ricardograca
Copy link
Member Author

😄 No problem. I'll get this fixed after the timestamps thing.

wubzz pushed a commit to wubzz/knex that referenced this issue Jul 13, 2018
wubzz pushed a commit that referenced this issue Jul 13, 2018
@wubzz wubzz reopened this Jul 13, 2018
@wubzz wubzz closed this as completed in d508609 Jul 13, 2018
@ricardograca
Copy link
Member Author

So, with all that back and forth I got lost. This isn't actually fixed is it?

@wubzz
Copy link
Member

wubzz commented Jul 13, 2018

@ricardograca No, it's not. Seems the revert decided closed it again.. Reverted due to this

@wubzz wubzz reopened this Jul 13, 2018
@elhigu elhigu closed this as completed in 932fa4b Sep 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants