Skip to content

Commit

Permalink
Fix builder company name property
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielRamosAcosta committed May 9, 2021
1 parent 4088a96 commit 7418636
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/linter/rules/companiesAreSortedAlphabetically.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Deno.test({
let companyName = "My Company";
const companies = [
createCompany({
company: companyName,
name: companyName,
socialNetworks: [
{
type: SocialNetworkType.LINKEDIN,
Expand Down
4 changes: 2 additions & 2 deletions test/createCompany.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -16,7 +16,7 @@ export const createCompany = ({
}],
jobPage = "https://example.org/jobs",
} = {}): Company => ({
name: company,
name,
type,
website,
hiringFrom,
Expand Down

0 comments on commit 7418636

Please sign in to comment.