test(aio): enable linting of transforms/
and add rules for jasmine
This commit is contained in:

committed by
Pete Bacon Darwin

parent
a562c64ed6
commit
62f9738a9a
@ -65,7 +65,7 @@ module.exports = function collectExamples(exampleMap, regionParser, log, createD
|
||||
|
||||
function createRegionDoc(folder, relativePath, regionName, regionContents) {
|
||||
const path = folder + '/' + relativePath;
|
||||
const id = path + '#' + regionName
|
||||
const id = path + '#' + regionName;
|
||||
return {
|
||||
docType: 'example-region',
|
||||
path: path,
|
||||
@ -74,4 +74,4 @@ function createRegionDoc(folder, relativePath, regionName, regionContents) {
|
||||
aliases: [id],
|
||||
contents: regionContents
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ describe('collectExampleRegions processor', () => {
|
||||
beforeEach(function() {
|
||||
|
||||
regionParser = jasmine.createSpy('regionParser').and.callFake(function(contents, extension) {
|
||||
return { contents: 'PARSED:' + contents, regions: {dummy: extension} }
|
||||
return { contents: 'PARSED:' + contents, regions: {dummy: extension} };
|
||||
});
|
||||
|
||||
const dgeni =
|
||||
@ -82,7 +82,7 @@ describe('collectExampleRegions processor', () => {
|
||||
createDoc('Other doc 2', 'other/b/c.js', 'content')
|
||||
];
|
||||
|
||||
const processedDocs = processor.$process(docs);
|
||||
processor.$process(docs);
|
||||
|
||||
expect(regionParser).toHaveBeenCalledTimes(3);
|
||||
expect(regionParser).toHaveBeenCalledWith('Example A', 'js');
|
||||
|
@ -1,9 +1,8 @@
|
||||
var testPackage = require('../../helpers/test-package');
|
||||
var Dgeni = require('dgeni');
|
||||
var path = require('path');
|
||||
|
||||
describe('renderExamples processor', () => {
|
||||
var injector, processor, exampleMap, regionParser, collectExamples, exampleMap;
|
||||
var injector, processor, exampleMap, collectExamples;
|
||||
|
||||
beforeEach(function() {
|
||||
const dgeni = new Dgeni([testPackage('examples-package', true)]);
|
||||
@ -24,7 +23,7 @@ describe('renderExamples processor', () => {
|
||||
});
|
||||
|
||||
it('should run before the correct processor', () => {
|
||||
expect(processor.$runBefore).toEqual(['writing-files'])
|
||||
expect(processor.$runBefore).toEqual(['writing-files']);
|
||||
});
|
||||
|
||||
it('should run after the correct processor', () => {
|
||||
@ -90,4 +89,4 @@ describe('renderExamples processor', () => {
|
||||
});
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user