Skip to content

Commit

Permalink
style: fix indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagomini committed Feb 26, 2024
1 parent 6555624 commit b03a987
Showing 1 changed file with 50 additions and 50 deletions.
100 changes: 50 additions & 50 deletions tests/rules/enforce-custom-provider-type.rule.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,19 +162,19 @@ ruleTester.run('enforce-custom-provider-type', enforceCustomProviderTypeRule, {
// Test for when the provider (class) is not of the preferred type (factory) in the "providers" array
{
code: `
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
@Module({
providers: [
{
provide: 'TOKEN',
useClass: SomeClass,
}
]
})
export class SomeModule {}
`,
@Module({
providers: [
{
provide: 'TOKEN',
useClass: SomeClass,
}
]
})
export class SomeModule {}
`,
errors: [
{
messageId: 'providerTypeMismatch',
Expand All @@ -189,19 +189,19 @@ ruleTester.run('enforce-custom-provider-type', enforceCustomProviderTypeRule, {
// Test for when the provider (existing) is not of the preferred type (factory) in the "providers" array
{
code: `
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
@Module({
providers: [
{
provide: 'TOKEN',
useExisting: SomeClass,
}
]
})
export class SomeModule {}
`,
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
@Module({
providers: [
{
provide: 'TOKEN',
useExisting: SomeClass,
}
]
})
export class SomeModule {}
`,
errors: [
{
messageId: 'providerTypeMismatch',
Expand All @@ -216,31 +216,31 @@ ruleTester.run('enforce-custom-provider-type', enforceCustomProviderTypeRule, {
// Test for when many provider types are not of the preferred type (factory) in the "providers" array
{
code: `
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
@Module({
providers: [
{
provide: 'TOKEN',
useExisting: SomeClass,
},
{
provide: 'TOKEN',
useClass: SomeClass,
},
{
provide: 'TOKEN',
useValue: 'value-in-providers-array',
},
{
provide: 'TOKEN',
useFactory: () => 'value-in-providers-array',
}
]
})
export class SomeModule {}
`,
import { Module } from '@nestjs/common';
import { SomeClass } from './some-class';
@Module({
providers: [
{
provide: 'TOKEN',
useExisting: SomeClass,
},
{
provide: 'TOKEN',
useClass: SomeClass,
},
{
provide: 'TOKEN',
useValue: 'value-in-providers-array',
},
{
provide: 'TOKEN',
useFactory: () => 'value-in-providers-array',
}
]
})
export class SomeModule {}
`,
errors: [
{
messageId: 'providerTypeMismatch',
Expand Down

0 comments on commit b03a987

Please sign in to comment.