diff options
author | winniehell <git@winniehell.de> | 2017-03-05 20:43:05 +0100 |
---|---|---|
committer | winniehell <git@winniehell.de> | 2017-03-05 21:22:40 +0100 |
commit | 572f9782d5e8d6307784b61db0dfce48f5118445 (patch) | |
tree | 11b25c46733462729e4303b26b4895d983f14df0 /spec/javascripts/pipelines_spec.js | |
parent | 4cd2ab52548e89cd7259cfb7ce320fdfa203fe84 (diff) | |
download | gitlab-ce-572f9782d5e8d6307784b61db0dfce48f5118445.tar.gz |
Remove .es6 from file extensions (!9241)
Diffstat (limited to 'spec/javascripts/pipelines_spec.js')
-rw-r--r-- | spec/javascripts/pipelines_spec.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/spec/javascripts/pipelines_spec.js b/spec/javascripts/pipelines_spec.js new file mode 100644 index 00000000000..72770a702d3 --- /dev/null +++ b/spec/javascripts/pipelines_spec.js @@ -0,0 +1,30 @@ +require('~/pipelines'); + +// Fix for phantomJS +if (!Element.prototype.matches && Element.prototype.webkitMatchesSelector) { + Element.prototype.matches = Element.prototype.webkitMatchesSelector; +} + +(() => { + describe('Pipelines', () => { + preloadFixtures('static/pipeline_graph.html.raw'); + + beforeEach(() => { + loadFixtures('static/pipeline_graph.html.raw'); + }); + + it('should be defined', () => { + expect(window.gl.Pipelines).toBeDefined(); + }); + + it('should create a `Pipelines` instance without options', () => { + expect(() => { new window.gl.Pipelines(); }).not.toThrow(); //eslint-disable-line + }); + + it('should create a `Pipelines` instance with options', () => { + const pipelines = new window.gl.Pipelines({ foo: 'bar' }); + + expect(pipelines.pipelineGraph).toBeDefined(); + }); + }); +})(); |