Skip to content

Commit

Permalink
Merge pull request #149 from ckeditor/i/111
Browse files Browse the repository at this point in the history
Other (generator): Removed the "experimental" label from TS and made it the default choice. Related #111.
  • Loading branch information
pomek authored Apr 25, 2023
2 parents f736d08 + 0dcdd24 commit 5b82666
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
const { prompt } = require( 'inquirer' );

const PROGRAMMING_LANGUAGES = [
{ value: 'js', displayName: 'JavaScript' },
{ value: 'ts', displayName: 'TypeScript (experimental)' }
{ value: 'ts', displayName: 'TypeScript' },
{ value: 'js', displayName: 'JavaScript' }
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe( 'lib/utils/choose-programming-language', () => {
name: 'programmingLanguage',
message: 'Choose your programming language:',
type: 'list',
choices: [ 'JavaScript', 'TypeScript (experimental)' ]
choices: [ 'TypeScript', 'JavaScript' ]
} ] );
} );

Expand All @@ -61,14 +61,14 @@ describe( 'lib/utils/choose-programming-language', () => {
} );

it( 'returns correct value when user picks TypeScript', async () => {
stubs.inquirer.prompt.resolves( { programmingLanguage: 'TypeScript (experimental)' } );
stubs.inquirer.prompt.resolves( { programmingLanguage: 'TypeScript' } );

const result = await chooseProgrammingLanguage( stubs.logger );

expect( result ).to.equal( 'ts' );
} );

it( 'returns lang option if it has valid value', async () => {
it( 'returns lang option if it defines a supported value', async () => {
const result = await chooseProgrammingLanguage( stubs.logger, 'ts' );

expect( result ).to.equal( 'ts' );
Expand All @@ -77,7 +77,7 @@ describe( 'lib/utils/choose-programming-language', () => {
} );

it( 'falls back to user input when lang option has invalid value', async () => {
stubs.inquirer.prompt.resolves( { programmingLanguage: 'TypeScript (experimental)' } );
stubs.inquirer.prompt.resolves( { programmingLanguage: 'TypeScript' } );

const result = await chooseProgrammingLanguage( stubs.logger, 'python' );

Expand Down

0 comments on commit 5b82666

Please sign in to comment.