Skip to content

Commit

Permalink
test: Remove unnecessary callbacks from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Jul 28, 2017
1 parent fe5b93e commit 6b49a18
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions __tests__/test.js
Expand Up @@ -71,7 +71,7 @@ test('bad input', function() {
glob
.sync(path.join(__dirname, 'fixture/bad', '*.input.js'))
.forEach(function(file) {
test(path.basename(file), function(t) {
test(path.basename(file), function() {
return documentation
.build([file], readOptionsFromFile(file))
.then(res => {
Expand All @@ -93,7 +93,7 @@ describe('html', function() {
glob
.sync(path.join(__dirname, 'fixture/html', '*.input.js'))
.forEach(function(file) {
test(path.basename(file), async function(t) {
test(path.basename(file), async function() {
const result = await documentation.build(
[file],
readOptionsFromFile(file)
Expand All @@ -113,33 +113,33 @@ describe('outputs', function() {
glob
.sync(path.join(__dirname, 'fixture', '*.input.js'))
.forEach(function(file) {
test(path.basename(file), async function(tt) {
test(path.basename(file), async function() {
const result = await documentation.build(
[file],
readOptionsFromFile(file)
);
test('markdown', async function(t) {
test('markdown', async function() {
const md = await outputMarkdown(_.cloneDeep(result), {
markdownToc: true
});
expect(result.toString()).toMatchSnapshot();
});

if (file.match(/es6.input.js/)) {
test('no markdown TOC', async function(t) {
test('no markdown TOC', async function() {
const txt = await outputMarkdown(_.cloneDeep(result), {
markdownToc: false
});
expect(result.toString()).toMatchSnapshot();
});
}

test('markdown AST', async function(t) {
test('markdown AST', async function() {
const ast = await outputMarkdownAST(_.cloneDeep(result), {});
expect(ast).toMatchSnapshot();
});

test('JSON', function(t) {
test('JSON', function() {
normalize(result);
result.forEach(function(comment) {
validate(
Expand Down

0 comments on commit 6b49a18

Please sign in to comment.