Skip to content

Commit

Permalink
fix: update variable names to standard
Browse files Browse the repository at this point in the history
Signed-off-by: warisniz02 <warisniz02@gmail.com>
  • Loading branch information
warisniz02 authored and aaqilniz committed Sep 1, 2024
1 parent f285ad3 commit ec7c6a0
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions packages/cli/test/integration/generators/discover.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ const disableCamelCaseOptions = {
const missingDataSourceOptions = {
dataSource: 'foo',
};
const specificmodelsOptions = {
models: 'Test',
dataSource: 'mem',
views: false,
disableCamelCase: true,
};
const optionalIdOptions = {
...baseOptions,
optionalId: true,
Expand All @@ -69,7 +63,12 @@ const relationsSetTrue = {
...baseOptions,
relations: true,
};

const specificModelsOptions = {
models: 'Test',
dataSource: 'mem',
views: false,
disableCamelCase: true,
};
// Expected File Name
const defaultExpectedTestModel = path.join(
sandbox.path,
Expand All @@ -87,7 +86,7 @@ const defaultExpectedNamingModel = path.join(
sandbox.path,
'src/models/naming.model.ts',
);
const AppointmentModel = path.join(
const appointmentModel = path.join(
sandbox.path,
'src/models/appointment.model.ts',
);
Expand Down Expand Up @@ -215,8 +214,8 @@ describe('lb4 discover integration', () => {
}),
)
.withOptions(relationsSetTrue);
assert.file(AppointmentModel);
expectFileToMatchSnapshot(AppointmentModel);
assert.file(appointmentModel);
expectFileToMatchSnapshot(appointmentModel);
});
});
it('generates specific models without prompts using --models', async () => {
Expand All @@ -227,7 +226,7 @@ describe('lb4 discover integration', () => {
additionalFiles: SANDBOX_FILES,
}),
)
.withOptions(specificmodelsOptions);
.withOptions(specificModelsOptions);

basicModelFileChecks(defaultExpectedTestModel, defaultExpectedIndexFile);
assert.file(defaultExpectedTestModel);
Expand Down

0 comments on commit ec7c6a0

Please sign in to comment.