Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unit tests for Angular 1.5 Component refernce app.
- Loading branch information
Showing
10 changed files
with
92 additions
and
3 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
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
25 changes: 25 additions & 0 deletions
25
ng-rosetta/fruit15/test/spec/components/fruit-detail.component.spec.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This source code is provided under the BSD license and is provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.MD for details. | ||
// Copyright Thomson Reuters 2017. All rights reserved. | ||
|
||
'use strict'; | ||
|
||
describe('Fruit Detail Controller', function () { | ||
var fruitDetailController; | ||
|
||
// Create an instance of the application module. | ||
beforeEach(module('fruitApp15')); | ||
|
||
// Create an instance of the target component and extract it's controller. | ||
beforeEach(inject(function ($componentController) { | ||
|
||
// Extract an instance of the component's controller class. | ||
fruitDetailController = $componentController('fruitdetailcomponent'); | ||
|
||
})); | ||
|
||
// Tests start here. | ||
it('should contain a testableProperty equal to "Test property"', function () { | ||
expect(fruitDetailController.testableProperty).toBe('Test property'); | ||
}); | ||
|
||
}); |
25 changes: 25 additions & 0 deletions
25
ng-rosetta/fruit15/test/spec/components/fruit-list.component.spec.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This source code is provided under the BSD license and is provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.MD for details. | ||
// Copyright Thomson Reuters 2017. All rights reserved. | ||
|
||
'use strict'; | ||
|
||
describe('Fruit List Controller', function () { | ||
var fruitListController; | ||
|
||
// Create an instance of the application module. | ||
beforeEach(module('fruitApp15')); | ||
|
||
// Create an instance of the target component and extract it's controller. | ||
beforeEach(inject(function ($componentController) { | ||
|
||
// Extract an instance of the component's controller class. | ||
fruitListController = $componentController('fruitlistcomponent'); | ||
|
||
})); | ||
|
||
// Tests start here. | ||
it('should contain a testableProperty equal to "Test property"', function () { | ||
expect(fruitListController.testableProperty).toBe('Test property'); | ||
}); | ||
|
||
}); |
25 changes: 25 additions & 0 deletions
25
ng-rosetta/fruit15/test/spec/components/home.component.spec.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// This source code is provided under the BSD license and is provided AS IS with no warranty or guarantee of fit for purpose. See the project's LICENSE.MD for details. | ||
// Copyright Thomson Reuters 2017. All rights reserved. | ||
|
||
'use strict'; | ||
|
||
describe('Home Controller', function () { | ||
var homeController; | ||
|
||
// Create an instance of the application module. | ||
beforeEach(module('fruitApp15')); | ||
|
||
// Create an instance of the target component and extract it's controller. | ||
beforeEach(inject(function ($componentController) { | ||
|
||
// Extract an instance of the component's controller class. | ||
homeController = $componentController('homecomponent'); | ||
|
||
})); | ||
|
||
// Tests start here. | ||
it('should contain a testableProperty equal to "Test property"', function () { | ||
expect(homeController.testableProperty).toBe('Test property'); | ||
}); | ||
|
||
}); |
3 changes: 3 additions & 0 deletions
3
ng-rosetta/fruit1x/test/spec/components/fruit-detail-controller.spec.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
3 changes: 3 additions & 0 deletions
3
ng-rosetta/fruit1x/test/spec/components/fruit-list-controller.spec.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
3 changes: 3 additions & 0 deletions
3
ng-rosetta/fruit1x/test/spec/components/home-controller.spec.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