We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My code:
import * as path from 'path'; import * as fs from 'fs'; import test from 'ava'; import { BlueprintAcceptanceTest } from '@denali-js/cli'; test('test outputed files', async (t) => { let defaultBlueprint = new BlueprintAcceptanceTest('default'); await defaultBlueprint.run(); let builtFile = path.join(defaultBlueprint.dir, 'dist', 'app', 'namespaces', 'application.js'); let results = fs.readFileSync(builtFile, 'utf-8'); t.log(results); t.true(results); });
The output:
$ DEBUG=@denali* denali test -- --verbose cli v0.1.4 [local] @denali-js/cli:bootstrap discovering commands from addons +0ms @denali-js/cli:find-addons searching for addons locally in /Users/iradchenko/sandbox/denali-sockets +0ms @denali-js/cli:find-addons found 2 addons: @denali-js/cli:find-addons - @denali-js/core [/Users/iradchenko/sandbox/denali-sockets/node_modules/@denali-js/core] @denali-js/cli:find-addons - @denali-js/typescript [/Users/iradchenko/sandbox/denali-sockets/node_modules/@denali-js/typescript] @denali-js/cli:find-addons +26ms @denali-js/cli:bootstrap found 10 commands from @denali-js/core: [ build, console, destroy, generate, install, migrate, publish, routes, server, test ] +638ms | denali v0.1.2 [local] @denali-js/cli:bootstrap found 0 commands from @denali-js/typescript: [ ] +1ms @denali-js/cli:command adding command: build +0ms @denali-js/cli:command adding command: console +1ms @denali-js/cli:command adding command: destroy <blueprint> +1ms @denali-js/cli:command adding command: generate <blueprint> +0ms @denali-js/cli:command adding command: install <addonName> +0ms @denali-js/cli:command adding command: migrate +0ms @denali-js/cli:command adding command: publish +0ms @denali-js/cli:command adding command: routes +1ms @denali-js/cli:command adding command: server +0ms @denali-js/cli:command adding command: test [files...] +0ms @denali-js/cli:command adding command: addon <name> +0ms @denali-js/cli:command adding command: new <name> +0ms @denali-js/cli:command building options for 'test' command +29ms @denali-js/cli:command invoking 'test' command +7ms @denali-js/cli:project creating project for /Users/iradchenko/sandbox/denali-sockets +0ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/test/dummy +0ms @denali-js/cli:builder using local builder +643ms @denali-js/cli:builder:dummy created builder for [email protected] +0ms @denali-js/cli:builder:dummy searching for child addons in /Users/iradchenko/sandbox/denali-sockets/test/dummy +1ms @denali-js/cli:builder:dummy discovered child addon: @denali-js/core +12ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/test/dummy/node_modules/@denali-js/core +0ms @denali-js/cli:builder using local builder +593ms @denali-js/cli:builder:dummy>@denali-js/core created builder for @denali-js/[email protected] +0ms @denali-js/cli:builder:dummy discovered child addon: @denali-js/eslint +612ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/test/dummy/node_modules/@denali-js/eslint +18ms @denali-js/cli:builder using local builder +49ms @denali-js/cli:builder:dummy>@denali-js/eslint created builder for @denali-js/[email protected] +0ms @denali-js/cli:builder:dummy discovered child addon: @denali-js/babel +51ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/test/dummy/node_modules/@denali-js/babel +2ms @denali-js/cli:builder using local builder +252ms @denali-js/cli:builder:dummy>@denali-js/babel created builder for @denali-js/[email protected]+0ms @denali-js/cli:builder:dummy discovered child addon: denali-sockets +253ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets +1ms @denali-js/cli:builder using local builder +0ms @denali-js/cli:builder:dummy>denali-sockets created builder for [email protected] +0ms @denali-js/cli:builder:dummy creating base tree from: app/,config/,lib/,blueprints/,commands/,config/,guides/,test/ +1ms @denali-js/cli:builder:dummy compiling +3ms @denali-js/cli:builder:dummy running hooks +0ms @denali-js/cli:builder:dummy running processParent hook from @denali-js/eslint +0ms @denali-js/cli:builder:dummy running processParent hook from @denali-js/babel +95ms @denali-js/cli:builder:dummy including @denali-js/core fragment in app bundle +229ms @denali-js/cli:builder:dummy>@denali-js/core is root builder: false; is developing: false; is addon under test: false; is symlinked: false; is not compiled: false +634ms @denali-js/cli:builder:dummy>@denali-js/core no build needed, using precompiled +0ms @denali-js/cli:builder:dummy including @denali-js/eslint fragment in app bundle +1ms @denali-js/cli:builder:dummy>@denali-js/eslint is root builder: false; is developing: false; is addon under test: false; is symlinked: false; is not compiled: false +583ms @denali-js/cli:builder:dummy>@denali-js/eslint no build needed, using precompiled +0ms @denali-js/cli:builder:dummy including @denali-js/babel fragment in app bundle +1ms @denali-js/cli:builder:dummy>@denali-js/babel is root builder: false; is developing: false; is addon under test: false; is symlinked: false; is not compiled: false +330ms @denali-js/cli:builder:dummy>@denali-js/babel no build needed, using precompiled +0ms @denali-js/cli:builder:dummy including denali-sockets fragment in app bundle +1ms @denali-js/cli:builder:dummy>denali-sockets is root builder: false; is developing: false; is addon under test: true; is symlinked: false; is not compiled: true +330ms @denali-js/cli:builder:dummy>denali-sockets not precompiled - building now +0ms @denali-js/cli:builder:dummy>denali-sockets searching for child addons in /Users/iradchenko/sandbox/denali-sockets +0ms @denali-js/cli:builder:dummy>denali-sockets discovered child addon: @denali-js/core +5ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/node_modules/@denali-js/core +0ms @denali-js/cli:builder using local builder +1ms @denali-js/cli:builder:dummy>denali-sockets>@denali-js/core created builder for @denali-js/[email protected] +0ms @denali-js/cli:builder:dummy>denali-sockets discovered child addon: @denali-js/typescript +2ms @denali-js/cli:builder creating builder for /Users/iradchenko/sandbox/denali-sockets/node_modules/@denali-js/typescript +1ms @denali-js/cli:builder using local builder +284ms @denali-js/cli:builder:dummy>denali-sockets>@denali-js/typescript created builder for @denali-js/[email protected] +0ms @denali-js/cli:builder:dummy>denali-sockets creating base tree from: app/,config/,lib/,blueprints/,commands/,config/,guides/,test/ +293ms @denali-js/cli:builder:dummy>denali-sockets compiling +10ms @denali-js/cli:builder:dummy>denali-sockets running hooks +0ms @denali-js/cli:builder:dummy>denali-sockets running processParent hook from @denali-js/typescript +0ms @denali-js/cli:builder:dummy>denali-sockets including unit tests in output +8ms @denali-js/cli:builder:dummy including unit tests in output +324ms @denali-js/cli:project building project +2s @denali-js/cli:project copying broccoli build output to dist +8s @denali-js/cli:project project build finished +34ms ✔ denali-sockets build complete (8.259s) ===> Running denali-sockets tests ... @denali-js/core:test:command-acceptance populating tmp/command-acceptance-test--22839yyR8 Z4aqjShD with dummy app +0ms 6 passed 1 failed acceptance › default-blueprint-test › test outputed files /Users/iradchenko/sandbox/denali-sockets/node_modules/@denali-js/cli/lib/test/command-acceptance.ts:136 Rejected promise returned by test. Reason: Error { code: 'EEXIST', errno: -17, path: 'tmp/command-acceptance-test--22839yyR8Z4aqjShD/node_modules', syscall: 'mkdir', message: 'EEXIST: file already exists, mkdir \'tmp/command-acceptance-test--22839yyR8Z4aqjShD/node_modules\'', } BlueprintAcceptanceTest.populateWithDummy (node_modules/@denali-js/cli/lib/test/command-acceptance.ts:136:8) new CommandAcceptanceTest (node_modules/@denali-js/cli/lib/test/command-acceptance.ts:117:12) new BlueprintAcceptanceTest (node_modules/@denali-js/cli/lib/test/blueprint-acceptance.ts:17:5) Test.__dirname [as fn] (tmp/-dummy/test/acceptance/default-blueprint-test.js:9:26) ===> Tests failed 💥
The text was updated successfully, but these errors were encountered:
Looks like https://github.com/denali-js/cli/blob/master/lib/test/command-acceptance.ts#L106 needs to be modified for the extended BlueprintAcceptanceTest class.
BlueprintAcceptanceTest
Sorry, something went wrong.
fix(lib/test): Set tmp dir name for BlueprintAcceptanceTest class
6e9c8a1
A work around for denali-js#60
No branches or pull requests
My code:
The output:
The text was updated successfully, but these errors were encountered: