Socket
Socket
Sign inDemoInstall

dgeni-packages

Package Overview
Dependencies
15
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.0-rc.1 to 0.10.0-rc.2

8

CHANGELOG.md
# Changelog
## v0.10.0-rc.2 10th September 2014
Bug fix
* fix(examples/generateProtractorTestsProcessor): enable testing 'ng-app-included' examples 46a0c516
## v0.10.0-rc.1 10th September 2014

@@ -4,0 +12,0 @@

3

examples/processors/protractor-generate.js

@@ -46,4 +46,5 @@ "use strict";

template: 'protractorTests.template.js',
innerTest: file.fileContents
innerTest: file.fileContents,
'ng-app-included': example['ng-app-included']
};
}

@@ -8,8 +8,10 @@ var mockPackage = require('../mocks/mockPackage');

it("should add a protractor doc for each deployment in the example", function() {
var processor, exampleMap;
beforeEach(function() {
var dgeni = new Dgeni([mockPackage()]);
var injector = dgeni.configureInjector();
var processor = injector.get('generateProtractorTestsProcessor');
processor = injector.get('generateProtractorTestsProcessor');
processor.templateFolder = 'examples';

@@ -27,22 +29,37 @@ processor.deployments = [

exampleMap = injector.get('exampleMap');
});
docs = [{ file: 'a.b.js' }];
files = {};
it("should add a protractor doc for each example-deployment pair in the example", function() {
files['index.html'] = { type: 'html', name: 'index.html', fileContents: 'index.html content' };
files['app.js'] = { type: 'js', name: 'app.js', fileContents: 'app.js content' };
files['app.css'] = { type: 'css', name: 'app.css', fileContents: 'app.css content' };
files['app.scenario.js'] = { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' };
docs = [
{ file: 'a.b.c.js' },
{ file: 'x.y.z.js' }
];
var exampleMap = injector.get('exampleMap');
exampleMap.set('a.b.c', {
id: 'a.b.c',
doc: docs[0],
outputFolder: 'examples',
deps: 'dep1.js;dep2.js',
files: files,
// outputFolder: 'examples',
// deps: 'dep1.js;dep2.js',
files: {
'index.html': { type: 'html', name: 'index.html', fileContents: 'index.html content' },
'app.scenario.js': { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' }
},
deployments: {}
});
exampleMap.set('x.y.z', {
id: 'x.y.z',
doc: docs[1],
// outputFolder: 'examples',
// deps: 'dep1.js;dep2.js',
files: {
'index.html': { type: 'html', name: 'index.html', fileContents: 'index.html content' },
'app.scenario.js': { type: 'protractor', name: 'app.scenario.js', fileContents: 'app.scenario.js content' }
},
deployments: {},
'ng-app-included': true
});

@@ -68,5 +85,22 @@ processor.$process(docs);

}),
jasmine.objectContaining({
docType: 'e2e-test',
id: 'protractorTest-x.y.z-' + processor.deployments[0].name,
example: exampleMap.get('x.y.z'),
deployment: processor.deployments[0],
template: 'protractorTests.template.js',
innerTest: 'app.scenario.js content',
'ng-app-included': true
}),
jasmine.objectContaining({
docType: 'e2e-test',
id: 'protractorTest-x.y.z-' + processor.deployments[1].name,
example: exampleMap.get('x.y.z'),
deployment: processor.deployments[1],
template: 'protractorTests.template.js',
innerTest: 'app.scenario.js content',
'ng-app-included': true
})
]);
});
});

@@ -1,7 +0,10 @@

describe("{$ doc.example.id $}", function() {
describe("{$ doc.description $}", function() {
var rootEl;
beforeEach(function() {
rootEl = browser.rootEl;{% if doc['ng-app-included'] %}
browser.rootEl = '[ng-app]';{% endif %}
browser.get("{$ doc.example.deployments[doc.deployment.name].outputPath $}");
});
{% if doc['ng-app-included'] %}afterEach(function() { browser.rootEl = rootEl; });{% endif %}
{$ doc.innerTest $}
});
});
{
"name": "dgeni-packages",
"version": "0.10.0-rc.1",
"version": "0.10.0-rc.2",
"description": "A collection of dgeni packages for generating documentation from source code",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc