From 741863667386d0ffb0c904ca6a443aed9b117b80 Mon Sep 17 00:00:00 2001 From: Daniel Ramos Date: Sun, 9 May 2021 02:35:18 +0100 Subject: [PATCH] Fix builder company name property --- .../rules/companiesAreSortedAlphabetically.test.ts | 12 ++++++------ .../socialNetworksAreSortedAlphabetically.test.ts | 2 +- test/createCompany.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/linter/rules/companiesAreSortedAlphabetically.test.ts b/src/linter/rules/companiesAreSortedAlphabetically.test.ts index 8127fe4..0d752e5 100644 --- a/src/linter/rules/companiesAreSortedAlphabetically.test.ts +++ b/src/linter/rules/companiesAreSortedAlphabetically.test.ts @@ -6,8 +6,8 @@ Deno.test({ name: "returns void if commpanies are sorted", fn: () => { const companies = [ - createCompany({ company: "A Company" }), - createCompany({ company: "B Company" }), + createCompany({ name: "A Company" }), + createCompany({ name: "B Company" }), ]; const result = companiesAreSortedAlphabetically(companies); @@ -20,8 +20,8 @@ Deno.test({ name: "returns an error if companies are not sorted", fn: () => { const companies = [ - createCompany({ company: "B Company" }), - createCompany({ company: "A Company" }), + createCompany({ name: "B Company" }), + createCompany({ name: "A Company" }), ]; const result = companiesAreSortedAlphabetically(companies) as Error; @@ -37,8 +37,8 @@ Deno.test({ name: "returns an error if companies are not sorted ignoring the case", fn: () => { const companies = [ - createCompany({ company: "a Company" }), - createCompany({ company: "B Company" }), + createCompany({ name: "a Company" }), + createCompany({ name: "B Company" }), ]; const result = companiesAreSortedAlphabetically(companies) as Error; diff --git a/src/linter/rules/socialNetworksAreSortedAlphabetically.test.ts b/src/linter/rules/socialNetworksAreSortedAlphabetically.test.ts index 17cac0f..a86f740 100644 --- a/src/linter/rules/socialNetworksAreSortedAlphabetically.test.ts +++ b/src/linter/rules/socialNetworksAreSortedAlphabetically.test.ts @@ -33,7 +33,7 @@ Deno.test({ let companyName = "My Company"; const companies = [ createCompany({ - company: companyName, + name: companyName, socialNetworks: [ { type: SocialNetworkType.LINKEDIN, diff --git a/test/createCompany.ts b/test/createCompany.ts index 10a6597..f02b6cd 100644 --- a/test/createCompany.ts +++ b/test/createCompany.ts @@ -6,7 +6,7 @@ import { } from "../src/models.ts"; export const createCompany = ({ - company = "Example Company", + name = "Example Company", type = CompanyType.SOFTWARE_DEVELOPMENT, website = "https://example.org/", hiringFrom = [Island.TENERIFE], @@ -16,7 +16,7 @@ export const createCompany = ({ }], jobPage = "https://example.org/jobs", } = {}): Company => ({ - name: company, + name, type, website, hiringFrom,