Skip to content

Commit

Permalink
INTL-1332: Updated cutom input
Browse files Browse the repository at this point in the history
  • Loading branch information
chetansinghchoudhary-wk committed Sep 25, 2023
1 parent dc10e48 commit c1cd8d0
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions test/executables/intl_message_migration_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -145,21 +145,24 @@ void main() {
// Test that we update the file to use the w_intl import, even if there are no other changes.
testCodemod('Import is updated',
script: script,
input: expectedOutputFiles(additionalFilesInLib: [
extraInput()
], messages: [
...defaultMessages,
...annotatedMessages,
], intlImport: 'intl/intl.dart'),
input: d.DirectoryDescriptor('', [
d.file('project/lib/more_stuff.dart', /*language=dart*/ '''
import 'package:test_project/src/intl/test_project_intl.dart';
import 'package:react_material_ui/react_material_ui.dart' as mui;
someMoreStrings() => (mui.Button()
..aria.label=TestProjectIntl.orange
..label=TestProjectIntl.aLongStringwithMultipleLines)
(TestProjectIntl.aquamarine, TestProjectIntl.twoAdjacentStringsOnSeparate);'''),

]),
expectedOutput: expectedOutputFiles(
additionalFilesInLib: [extraOutput()],
messages: [
...defaultMessages,
...annotatedMessages,
...longMessages
]..sort(),
intlImport: 'package:react_material_ui/react_material_ui.dart as mui',
),
]..sort()),
args: ['--yes-to-all']);

testCodemod('Import is updated without other modifications',
Expand Down Expand Up @@ -349,3 +352,5 @@ ${messages.join('\n\n')}
}

const wIntl = 'w_intl';


0 comments on commit c1cd8d0

Please sign in to comment.