I'm trying to unit test an Ember application that makes use of Google Charts. I'm using a karma test runner and writing my tests with qunit. When I start the test runner as soon as it sees the first reference for google it throws this error:
Chrome 56.0.2924 (Windows 7 0.0.0) ERROR
Uncaught ReferenceError: google is not defined
at dist/scripts/app.js:2
I tried referencing the google charts files in my karma.conf file to no avail. Here's what that currently looks like:
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['qunit'],
files: [
'dist/scripts/plugins.js',
'dist/scripts/app.js',
'dist/scripts/tests.js',
],
plugins: [
'karma-qunit',
'karma-chrome-launcher'
],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false,
concurrency: Infinity
})
}
Aucun commentaire:
Enregistrer un commentaire