@@ -13,12 +13,12 @@ tmp.setGracefulCleanup();
1313const ROOT = process . cwd ( ) ;
1414const EXECUTABLE_PATH = path . join ( __dirname , '..' , 'bin' , 'ember-source-channel-url' ) ;
1515
16- QUnit . module ( 'ember-source-channel-url' , function ( hooks ) {
16+ QUnit . module ( 'ember-source-channel-url' , function ( hooks ) {
1717 function randomString ( length ) {
1818 return crypto . randomBytes ( Math . ceil ( length / 2 ) ) . toString ( 'hex' ) ;
1919 }
2020
21- hooks . beforeEach ( async function ( ) {
21+ hooks . beforeEach ( async function ( ) {
2222 let dir = tmp . dirSync ( ) ;
2323 process . chdir ( dir . name ) ;
2424
@@ -38,28 +38,26 @@ QUnit.module('ember-source-channel-url', function(hooks) {
3838 return server . listen ( server . port ) ;
3939 } ) ;
4040
41- hooks . afterEach ( function ( ) {
41+ hooks . afterEach ( function ( ) {
4242 process . chdir ( ROOT ) ;
4343
4444 return this . server . close ( ) ;
4545 } ) ;
4646
47- QUnit . test ( 'works' , async function ( assert ) {
48- let expected = `http://${ this . server . host } :${ this . server . port } /builds.emberjs.com${
49- this . assetPath
50- } `;
47+ QUnit . test ( 'works' , async function ( assert ) {
48+ let expected = `http://${ this . server . host } :${ this . server . port } /builds.emberjs.com${ this . assetPath } ` ;
5149
5250 let actual = await getChannelURL ( 'canary' ) ;
5351 assert . equal ( actual , expected ) ;
5452 } ) ;
5553
56- QUnit . module ( 'binary' , function ( ) {
57- QUnit . test ( 'works' , async function ( assert ) {
54+ QUnit . module ( 'binary' , function ( ) {
55+ QUnit . test ( 'works' , async function ( assert ) {
5856 let results = await execa ( EXECUTABLE_PATH , [ 'canary' ] ) ;
5957 assert . ok ( results . stdout . includes ( this . expectedURL ) , 'URL is present in stdout' ) ;
6058 } ) ;
6159
62- QUnit . test ( 'when the terminal is not a TTY return only the URL' , async function ( assert ) {
60+ QUnit . test ( 'when the terminal is not a TTY return only the URL' , async function ( assert ) {
6361 let file = tmp . fileSync ( ) ;
6462 await execa ( EXECUTABLE_PATH , [ 'canary' ] , { stdout : file . fd } ) ;
6563 assert . equal (
@@ -69,7 +67,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
6967 ) ;
7068 } ) ;
7169
72- QUnit . test ( 'updates local package.json when -w is passed (dependencies)' , async function (
70+ QUnit . test ( 'updates local package.json when -w is passed (dependencies)' , async function (
7371 assert
7472 ) {
7573 fs . writeFileSync (
@@ -87,7 +85,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
8785 } ) ;
8886 } ) ;
8987
90- QUnit . test ( 'updates local package.json when --write is passed (dependencies)' , async function (
88+ QUnit . test ( 'updates local package.json when --write is passed (dependencies)' , async function (
9189 assert
9290 ) {
9391 fs . writeFileSync (
@@ -107,7 +105,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
107105
108106 QUnit . test (
109107 'updates local package.json when --write is passed (devDependencies)' ,
110- async function ( assert ) {
108+ async function ( assert ) {
111109 fs . writeFileSync (
112110 'package.json' ,
113111 JSON . stringify ( { devDependencies : { 'ember-source' : '^3.10.0' } } ) ,
@@ -124,7 +122,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
124122 }
125123 ) ;
126124
127- QUnit . test ( 'preserves line ending when updating package.json' , async function ( assert ) {
125+ QUnit . test ( 'preserves line ending when updating package.json' , async function ( assert ) {
128126 fs . writeFileSync (
129127 'package.json' ,
130128 JSON . stringify ( { dependencies : { 'ember-source' : '^3.10.0' } } , null , 2 ) + '\n' ,
@@ -138,7 +136,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
138136 assert . deepEqual ( fs . readFileSync ( 'package.json' , { encoding : 'utf8' } ) , expected ) ;
139137 } ) ;
140138
141- QUnit . test ( 'fails when package.json is missing' , async function ( assert ) {
139+ QUnit . test ( 'fails when package.json is missing' , async function ( assert ) {
142140 try {
143141 await execa ( EXECUTABLE_PATH , [ 'canary' , '--write' ] ) ;
144142 } catch ( results ) {
@@ -150,7 +148,7 @@ QUnit.module('ember-source-channel-url', function(hooks) {
150148 }
151149 } ) ;
152150
153- QUnit . test ( 'fails when ember-source is not a dep' , async function ( assert ) {
151+ QUnit . test ( 'fails when ember-source is not a dep' , async function ( assert ) {
154152 fs . writeFileSync ( 'package.json' , JSON . stringify ( { } ) , {
155153 encoding : 'utf8' ,
156154 } ) ;
0 commit comments