-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hendrathings/features/feature-test-karma
Features/feature test karma
Showing
20 changed files
with
1,467 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ npm-debug.log | |
|
||
# OS generated files | ||
Thumbs.db | ||
.DS_Store | ||
.DS_Store | ||
coverage |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ npm-debug.log | |
|
||
# OS generated files | ||
Thumbs.db | ||
.DS_Store | ||
.DS_Store | ||
coverage |
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
Empty file.
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,33 @@ | ||
"use strict"; | ||
var testing_1 = require("@angular/core/testing"); | ||
var angular2_nvd3_component_1 = require("../angular2-nvd3/angular2-nvd3.component"); | ||
var sample_data_1 = require("./sample-data"); | ||
sample_data_1.SampleData.chartTypes.forEach(function (type) { | ||
describe("tasks:NvD3Component " + type, function () { | ||
var component; | ||
var fixture; | ||
var componentElement; | ||
beforeEach(function () { | ||
testing_1.TestBed.configureTestingModule({ | ||
declarations: [angular2_nvd3_component_1.NvD3Component], | ||
}); | ||
fixture = testing_1.TestBed.createComponent(angular2_nvd3_component_1.NvD3Component); | ||
component = fixture.componentInstance; | ||
component.options = sample_data_1.SampleData.allOptions[type]; | ||
component.data = sample_data_1.SampleData.allData[type]; | ||
fixture.detectChanges(); | ||
componentElement = fixture.nativeElement; | ||
}); | ||
it("should have svg", function () { | ||
expect(componentElement.querySelectorAll('svg').length).toBe(1); | ||
}); | ||
it('should svg have class nvd3-svg', function () { | ||
var gElement = componentElement.querySelector('svg'); | ||
expect(gElement.classList).toContain('nvd3-svg'); | ||
}); | ||
it("should g have class nv-" + type, function () { | ||
var gElement = componentElement.querySelector('g'); | ||
expect(gElement.className.baseVal).toContain(sample_data_1.SampleData.chartClassExpected[type]); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.