This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
  
  
  Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
  
  Browse files
  Browse the repository at this point in the history 
    
    
    
  
  
    
     
  
    
      
      
    
    
  
  
      chore(modules): execute modules unit tests in one karma run
    
    SauceLabs is struggling to keep connecting and disconnecting for each of the modules unit test runs. This commit puts most of the module tests into IIFEs so that they can be run in one go. * ngMock is still tested separately since unlike the other tests it doesn't want to have a pre-built version of ngMock available. * ngAnimate is still tested separately because it does some funny things with globals that were difficult to isolate in the main modules test run.
- Loading branch information
 
      
        1 parent
          
          5f1cf11
      
      commit 264819a
    
  
      Showing
      7 changed files
      with
      102 additions
      and
      48 deletions.
    
  
  There are no files selected for viewing
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use strict'; | ||
| 
     | 
||
| var angularFiles = require('./angularFiles'); | ||
| var sharedConfig = require('./karma-shared.conf'); | ||
| 
     | 
||
| module.exports = function(config) { | ||
| sharedConfig(config, {testName: 'AngularJS: isolated module tests (ngAnimate)', logFile: 'karma-ngAnimate-isolated.log'}); | ||
| 
     | 
||
| config.set({ | ||
| files: angularFiles.mergeFilesFor('karmaModules-ngAnimate') | ||
| }); | ||
| }; | 
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| 'use strict'; | ||
| 
     | 
||
| var angularFiles = require('./angularFiles'); | ||
| var sharedConfig = require('./karma-shared.conf'); | ||
| 
     | 
||
| module.exports = function(config) { | ||
| sharedConfig(config, {testName: 'AngularJS: isolated module tests (ngMock)', logFile: 'karma-ngMock-isolated.log'}); | ||
| 
     | 
||
| config.set({ | ||
| files: angularFiles.mergeFilesFor('karmaModules-ngMock') | ||
| }); | ||
| }; | 
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,14 +1,20 @@ | ||
| 'use strict'; | ||
| 
     | 
||
| var angularFiles = require('./angularFiles'); | ||
| var sharedConfig = require('./karma-shared.conf'); | ||
| 
     | 
||
| module.exports = function(config) { | ||
| var angularModule = process.env.KARMA_MODULE; | ||
| 
     | 
||
| sharedConfig(config, {testName: 'AngularJS: module ' + angularModule, logFile: 'karma-modules-' + angularModule + '.log'}); | ||
| sharedConfig(config, {testName: 'AngularJS: isolated module tests', logFile: 'karma-modules-isolated.log'}); | ||
| 
     | 
||
| config.set({ | ||
| files: angularFiles.mergeFilesFor('karmaModules-' + angularModule) | ||
| files: [ | ||
| 'build/angular.js', | ||
| 'build/angular-mocks.js', | ||
| 'test/modules/no_bootstrap.js', | ||
| 'test/helpers/matchers.js', | ||
| 'test/helpers/privateMocks.js', | ||
| 'test/helpers/support.js', | ||
| 'test/helpers/testabilityPatch.js', | ||
| 'build/test-bundles/angular-*.js' | ||
| ] | ||
| }); | ||
| }; | 
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
            
            
  
    
      This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters