chore(doclint): move doclint tests expectations into test folders (#932)

This makes for much easier work with doclint tests.
This commit is contained in:
Andrey Lushnikov
2017-10-02 11:37:16 -07:00
committed by GitHub
parent f9640a5498
commit 41fd4b529e
12 changed files with 13 additions and 11 deletions

View File

@@ -0,0 +1,2 @@
result-actual.txt
result-diff.html

View File

@@ -1,3 +0,0 @@
[MarkDown] Non-existing class found: Bar
[MarkDown] Non-existing class found: Baz
[MarkDown] Class not found: Other

View File

@@ -44,10 +44,6 @@ afterAll(SX(async function() {
await browser.close();
}));
beforeEach(function() {
GoldenUtils.addMatchers(jasmine, GOLDEN_DIR, OUTPUT_DIR);
});
describe('checkPublicAPI', function() {
it('01-class-errors', SX(test));
it('02-method-errors', SX(test));
@@ -61,12 +57,13 @@ describe('checkPublicAPI', function() {
async function test() {
const dirPath = path.join(__dirname, specName);
GoldenUtils.addMatchers(jasmine, dirPath, dirPath);
const factory = new SourceFactory();
const mdSources = await factory.readdir(dirPath, '.md');
const jsSources = await factory.readdir(dirPath, '.js');
const messages = await checkPublicAPI(page, mdSources, jsSources);
const errors = messages.map(message => message.text);
expect(errors.join('\n')).toBeGolden(specName + '.txt');
expect(errors.join('\n')).toBeGolden('result.txt');
}
// Since Jasmine doesn't like async functions, they should be wrapped