@@ -12,6 +12,8 @@ const remote = require('electron').remote
1212
1313const { ipcMain, BrowserWindow } = remote
1414
15+ const features = process . atomBinding ( 'features' )
16+
1517describe ( 'asar package' , function ( ) {
1618 const fixtures = path . join ( __dirname , 'fixtures' )
1719
@@ -844,6 +846,12 @@ describe('asar package', function () {
844846 } )
845847
846848 describe ( 'child_process.fork' , function ( ) {
849+ before ( function ( ) {
850+ if ( ! features . isRunAsNodeEnabled ( ) ) {
851+ this . skip ( )
852+ }
853+ } )
854+
847855 it ( 'opens a normal js file' , function ( done ) {
848856 const child = ChildProcess . fork ( path . join ( fixtures , 'asar' , 'a.asar' , 'ping.js' ) )
849857 child . on ( 'message' , function ( msg ) {
@@ -1040,6 +1048,12 @@ describe('asar package', function () {
10401048 } )
10411049
10421050 describe ( 'process.env.ELECTRON_NO_ASAR' , function ( ) {
1051+ before ( function ( ) {
1052+ if ( ! features . isRunAsNodeEnabled ( ) ) {
1053+ this . skip ( )
1054+ }
1055+ } )
1056+
10431057 it ( 'disables asar support in forked processes' , function ( done ) {
10441058 const forked = ChildProcess . fork ( path . join ( __dirname , 'fixtures' , 'module' , 'no-asar.js' ) , [ ] , {
10451059 env : {
@@ -1205,6 +1219,11 @@ describe('asar package', function () {
12051219 } )
12061220
12071221 it ( 'is available in forked scripts' , function ( done ) {
1222+ if ( ! features . isRunAsNodeEnabled ( ) ) {
1223+ this . skip ( )
1224+ done ( )
1225+ }
1226+
12081227 const child = ChildProcess . fork ( path . join ( fixtures , 'module' , 'original-fs.js' ) )
12091228 child . on ( 'message' , function ( msg ) {
12101229 assert . strictEqual ( msg , 'object' )
0 commit comments