Skip to content

Commit

Permalink
refactor: update test descriptions to use sample instead of example
Browse files Browse the repository at this point in the history
  • Loading branch information
Erick2280 committed Sep 21, 2024
1 parent 3c02155 commit 0435279
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions tests/rules/accessibility-element-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityElementModifierRemover;

describe('AccessibilityElementModifierRemover', () => {
it('runs the rule successfully for Elane example', async () => {
it('runs the rule successfully for Elane sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane_noAccessibilityElementModifier.swift`,
[rule],
);
});

it('runs the rule successfully for Elane example when substitute with comment is enabled', async () => {
it('runs the rule successfully for Elane sample when substitute with comment is enabled', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane_noAccessibilityElementModifierWithComments.swift`,
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/accessibility-hidden-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityHiddenModifierRemover;

describe('AccessibilityHiddenModifierRemover', () => {
it('runs the rule successfully for Enzo example', async () => {
it('runs the rule successfully for Enzo sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Enzo.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Enzo_noAccessibilityHiddenModifier.swift`,
Expand Down
4 changes: 2 additions & 2 deletions tests/rules/accessibility-hint-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityHintModifierRemover;

describe('AccessibilityHintModifierRemover', () => {
it('runs the rule successfully for Romilda example', async () => {
it('runs the rule successfully for Romilda sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda_noAccessibilityHintModifier.swift`,
[rule],
);
});

it('runs the rule successfully for Romilda example when substitute with comment is enabled', async () => {
it('runs the rule successfully for Romilda sample when substitute with comment is enabled', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda_noAccessibilityHintModifierWithComments.swift`,
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/accessibility-label-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityLabelModifierRemover;

describe('AccessibilityLabelModifierRemover', () => {
it('runs the rule successfully for Raislan example', async () => {
it('runs the rule successfully for Raislan sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Raislan.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Raislan_noAccessibilityLabelModifier.swift`,
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/accessibility-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityModifierRemover;

describe('AccessibilityModifierRemover', () => {
it('runs the rule successfully for Hildete example', async () => {
it('runs the rule successfully for Hildete sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete_noAccessibilityModifier.swift`,
Expand Down
2 changes: 1 addition & 1 deletion tests/rules/accessibility-value-modifier-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const expectIsSameFileAfterApplyingRules =
const rule = AccessibilityValueModifierRemover;

describe('AccessibilityValueModifierRemover', () => {
it('runs the rule successfully for Romilda example', async () => {
it('runs the rule successfully for Romilda sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Romilda_noAccessibilityValueModifier.swift`,
Expand Down
4 changes: 2 additions & 2 deletions tests/rules/image-decorative-label-remover.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const expectIsSameFileAfterApplyingRules =
const rule = ImageDecorativeLabelRemover;

describe('ImageDecorativeLabelRemover', () => {
it('runs the rule successfully for Enzo example', async () => {
it('runs the rule successfully for Enzo sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Enzo.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Enzo_noImageDecorativeLabel.swift`,
[rule],
);
});

it('is no-op for Hildete example', async () => {
it('is no-op for Hildete sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete.swift`,
Expand Down
6 changes: 3 additions & 3 deletions tests/rules/standard-font-to-static-size-replacer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ const expectIsSameFileAfterApplyingRules =
const rule = StandardFontToStaticSizeReplacer;

describe('StandardFontToStaticSizeReplacer', () => {
it('runs the rule successfully for Elane example', async () => {
it('runs the rule successfully for Elane sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane_staticFontSizes.swift`,
[rule],
);
});

it('runs the rule successfully for Elane example when substitute with comment is enabled', async () => {
it('runs the rule successfully for Elane sample when substitute with comment is enabled', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Elane_staticFontSizesWithComments.swift`,
Expand All @@ -30,7 +30,7 @@ describe('StandardFontToStaticSizeReplacer', () => {
);
});

it('is no-op for Hildete example', async () => {
it('is no-op for Hildete sample', async () => {
await expectIsSameFileAfterApplyingRules(
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete.swift`,
`${SWIFT_FILE_SAMPLES_BASE_PATH}/Hildete.swift`,
Expand Down

0 comments on commit 0435279

Please sign in to comment.