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

WIP - add test for functional creation #190

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from
Open

Conversation

bgrins
Copy link
Owner

@bgrins bgrins commented Aug 25, 2018

I realized that the functional creation does actually work in node as well, it just doesn't in the test when we import from import TinyColor from '../src/public_api'; because I guess that's not compiling down to es2015, or something.

This isn't landable since it will break tests if npm run build didn't happen first. But I'm now wondering though.. should we be testing against dist/ instead of src/? I could see a gap where all tests pass against src/ but there was a bug with the build / packaging itself and we shipped out a broken dist/? Or is that a narrow enough gap that it's not worth worrying about. @scttcper any thoughts? I'm not sure what's normally done with TS projects.

@scttcper
Copy link

scttcper commented Aug 26, 2018

Functional creation probably only doesn't work because typescript says its not callable.

I don't usually test against the dist directory, but you can. would need to change the order on travis to build first https://github.com/bgrins/TinyColor/blob/v2/.travis.yml#L6-L8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants