mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
* Add the missing blank line. Add a test verify it. * Less code is the best code. Thanks Spencer :)
This commit is contained in:
parent
e833cfe6d1
commit
5d33d2548a
1 changed files with 8 additions and 1 deletions
|
@ -21,7 +21,7 @@
|
|||
import { spawn } from 'child_process';
|
||||
import { resolve } from 'path';
|
||||
import util from 'util';
|
||||
import { stat } from 'fs';
|
||||
import { stat, readFileSync } from 'fs';
|
||||
import { snakeCase } from 'lodash';
|
||||
import del from 'del';
|
||||
import { withProcRunner, ToolingLog } from '@kbn/dev-utils';
|
||||
|
@ -61,6 +61,13 @@ describe(`running the plugin-generator via 'node scripts/generate_plugin.js plug
|
|||
expect(stats.isDirectory()).toBe(true);
|
||||
});
|
||||
|
||||
it(`should create an internationalization config file with a blank line appended to satisfy the parser`, async () => {
|
||||
// Link to the error that happens when the blank line is not there:
|
||||
// https://github.com/elastic/kibana/pull/45044#issuecomment-530092627
|
||||
const intlFile = `${generatedPath}/.i18nrc.json`;
|
||||
expect(readFileSync(intlFile, 'utf8').endsWith('\n\n')).toBe(true);
|
||||
});
|
||||
|
||||
describe(`then running`, () => {
|
||||
it(`'yarn test:browser' should exit 0`, async () => {
|
||||
await execa('yarn', ['test:browser'], { cwd: generatedPath });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue