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

Tweak Jasmine config to use custom browser on MacOSX (arm64) #1482

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions grunt/jasmine.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
module.exports = function(grunt) {
const os = require('os');
const ifMacOsWithArm64 = (os.platform() === 'darwin') && (process.arch === 'arm64')
const noSandbox = !ifMacOsWithArm64;
const sandboxArgs = ifMacOsWithArm64
? { executablePath: '/Applications/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing' } // here is location for Google for Testing}
: {}

return {
src: [
'src/js/data.js',
Expand All @@ -7,7 +14,7 @@ module.exports = function(grunt) {
],
options: {
version: '3.8.0',
noSandbox: true,
noSandbox: noSandbox,
vendor: [
'node_modules/jquery/dist/jquery.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
Expand All @@ -22,7 +29,8 @@ module.exports = function(grunt) {
],
styles: "build/css/intlTelInput.css", // required so adding "hide" class actually works etc.
outfile: 'spec.html',
keepRunner: true
keepRunner: true,
sandboxArgs: sandboxArgs,
}
};
};