Skip to content

Commit

Permalink
fix(lint): fix lint error "require-atomic-updates"
Browse files Browse the repository at this point in the history
  • Loading branch information
segayuu committed Feb 25, 2020
1 parent 923d1c9 commit a34ad06
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/scripts/console/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ describe('config', () => {
await writeFile(configPath, '{}');
await config({_: ['title', 'My Blog']});

const content = await readFile(configPath);
return readFile(configPath).then(content => {
const json = JSON.parse(content);

const json = JSON.parse(content);
json.title.should.eql('My Blog');

json.title.should.eql('My Blog');

hexo.config_path = join(hexo.base_dir, '_config.yml');
return unlink(configPath);
hexo.config_path = join(hexo.base_dir, '_config.yml');
return unlink(configPath);
});
});

it('create config if not exist', async () => {
Expand Down

0 comments on commit a34ad06

Please sign in to comment.