Skip to content

Commit

Permalink
fix: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stdavis committed Apr 5, 2023
1 parent 084963d commit 2d5b965
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 36 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ functions/.secret.local
# firebase
*-debug.log
emulator_data/
firestore_export*
3 changes: 1 addition & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ module.exports = function (grunt) {
'src/app/packages.js',
'src/app/tests/jasmineAMDErrorChecking.js'
],
host: 'http://localhost:8000',
version: '2.5.1'
host: 'http://localhost:8000'
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions _SpecRunner.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

<script src=".grunt/grunt-contrib-jasmine/jasmine-html.js"></script>

<script src=".grunt/grunt-contrib-jasmine/json2.js"></script>
<script src=".grunt/grunt-contrib-jasmine/boot0.js"></script>

<script src=".grunt/grunt-contrib-jasmine/boot1.js"></script>

<script src="src/app/tests/jasmineTestBootstrap.js"></script>

Expand All @@ -40,8 +42,6 @@

<script src="src/app/tests/spec/SpecAGSStore.js"></script>

<script src="src/app/tests/spec/SpecApp.js"></script>

<script src="src/app/tests/spec/SpecDownload.js"></script>

<script src="src/app/tests/spec/SpecFilterContainer.js"></script>
Expand Down
4 changes: 3 additions & 1 deletion _src/app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ define([
let databaseName = 'Electrofishing';
let dataEntryApp = 'https://electrofishing.ugrc.utah.gov';
let baseUrl;
const projectId = JSON.parse(process.env.FIREBASE_CONFIG).projectId;

const projectId = window.dojoConfig.isJasmineTestRunner ? 'test' :
JSON.parse(process.env.FIREBASE_CONFIG).projectId;
if (has('agrc-build') === 'prod') {
// *.ugrc.utah.gov
quadWord = 'dinner-oregano-india-bahama';
Expand Down
6 changes: 4 additions & 2 deletions _src/app/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
return window.Worker;
});

window.firebase.initializeApp(JSON.parse(process.env.FIREBASE_CONFIG));
console.log('firebase app initialized');
if (!window.dojoConfig.isJasmineTestRunner) {
window.firebase.initializeApp(JSON.parse(process.env.FIREBASE_CONFIG));
console.log('firebase app initialized');
}

parser.parse();
});
Expand Down
28 changes: 0 additions & 28 deletions _src/app/tests/spec/SpecApp.js

This file was deleted.

0 comments on commit 2d5b965

Please sign in to comment.