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

Build does not work cross platform #9 #10

Merged
merged 2 commits into from
May 26, 2017
Merged

Conversation

lucastheisen
Copy link
Contributor

Updated tests and package.json to work cross platform

@lucastheisen
Copy link
Contributor Author

Crap, this builds fine on Windows 10 with node 7... Lemme try a node 6 and see if that makes a difference.

@lucastheisen
Copy link
Contributor Author

well, works fine on windows 10 with node 6.10.3:

PS C:\Users\ltheisen\git\pastdev-vuetype> .\node-v6.10.3-win-x64\npm run test

> vuetype@0.2.1 test C:\Users\ltheisen\git\pastdev-vuetype
> rimraf test/fixtures/*.d.ts && mocha --compilers ts:espower-typescript/guess test/specs/**/*.ts



  tsconfig detection
    √ should find tsconfig.json on a directory
    √ should find tsconfig.json on the closest ancestor
    √ returns undefined if config is not found
    √ read tsconfig.json
    √ returns undefined if the config file is not found

  file-util
    √ detects deepest shared root

  generate
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\fixtures\ts-class.vue.d.ts
    √ should emit d.ts for class component in sfc (433ms)
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\fixtures\ts-object.vue.d.ts
    √ should emit d.ts for component options in sfc (211ms)
    √ should not emit d.ts for js
    √ should not emit d.ts for normal ts
Emit Failed: C:\Users\ltheisen\git\pastdev-vuetype\test\fixtures\ts-error.vue.d.ts
  Error: [11,3] Type '"Hello"' is not assignable to type 'number'.
    √ should not emit d.ts if there are errors (235ms)
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\fixtures\import.vue.d.ts
    √ should emit d.ts with imported ts types (274ms)

  watch
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
    √ generates d.ts if .vue file is added (440ms)
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
    √ updates d.ts if .vue file is updated (673ms)
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
Removed: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
    √ removes d.ts if corresponding .vue file is removed (488ms)
Emitted: C:\Users\ltheisen\git\pastdev-vuetype\test\.tmp\test.vue.d.ts
    √ allows re-add .vue file (370ms)


  16 passing (3s)

@lucastheisen
Copy link
Contributor Author

Ok, so i fixed the file cleanup, and filed a bug with memory-fs, but have no idea why your CI generates var when ts emits, but mine generates const:

      + expected - actual

      -declare var _default: {
      +declare const _default: {

Any idea on this?

@ktsn
Copy link
Owner

ktsn commented May 26, 2017

It's likely because TypeScript version mismatch since CI had the caches of dependencies. I've clear and rebuild it.

@ktsn
Copy link
Owner

ktsn commented May 26, 2017

LGTM. Thanks 👍

@ktsn ktsn merged commit 4f48222 into ktsn:master May 26, 2017
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