Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update variable names to standard #10614

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading