From 2c6e55abf91daee793a901a8ea505200ac3ca5de Mon Sep 17 00:00:00 2001 From: Andre Wiggins <459878+andrewiggins@users.noreply.github.com> Date: Fri, 3 Jan 2025 16:16:26 -0800 Subject: [PATCH] Upgrade prettier (#23) --- .editorconfig | 15 +++++++++++++++ index.ts | 18 +++++++++--------- package-lock.json | 19 ++++++++++--------- package.json | 2 +- src/events.ts | 10 +++++----- src/normalizers.ts | 4 ++-- src/repos/airtable-metadata.ts | 6 +++--- src/repos/user-input.ts | 12 ++++++------ src/repos/website.ts | 12 ++++++------ src/speakers.ts | 8 ++++---- src/sponsors.ts | 8 ++++---- src/talks.ts | 10 +++++----- test/normalizers.test.ts | 10 +++++----- test/speakers.spec.ts | 16 ++++++++-------- test/talks.spec.ts | 34 +++++++++++++++++----------------- 15 files changed, 100 insertions(+), 84 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d9b274d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +root = true + +[*] +indent_style = space +indent_size = 2 +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[{package.json,package-lock.json,.*rc,*.yml,*.yaml}] +indent_style = space +indent_size = 2 + +[*.md] +trim_trailing_whitespace = false diff --git a/index.ts b/index.ts index 008b367..c68e09b 100644 --- a/index.ts +++ b/index.ts @@ -60,15 +60,15 @@ const airtableBase = Airtable.base(airtableMetadata.baseId); // load the airtable data we'll need const airtableEvents = await getAirtableEvents( airtableBase, - airtableMetadata.eventsId + airtableMetadata.eventsId, ); const airtableSpeakers = await getAirtableSpeakers( airtableBase, - airtableMetadata.speakersId + airtableMetadata.speakersId, ); const airtableSponsors = await getAirtableSponsors( airtableBase, - airtableMetadata.sponsorsId + airtableMetadata.sponsorsId, ); console.log("gathering existing website data..."); @@ -84,7 +84,7 @@ const websiteSponsors = await getWebsiteSponsors(config.seattlejsProjectPath); // only used to prompt the user for which event they want to modify const eventMap = mapAirtableEventsToWebsiteEvents( airtableEvents, - websiteEvents + websiteEvents, ); const targetEvent = await getTargetEvent(eventMap); @@ -95,19 +95,19 @@ if (!targetEvent.website) { const { newPhotos, updatedSpeakers } = reconcileSpeakers( targetEvent, airtableSpeakers, - websiteSpeakers + websiteSpeakers, ); const { updatedTalks, removedTalks } = reconcileTalks( targetEvent, airtableSpeakers, - websiteTalks + websiteTalks, ); const { newLogos, updatedSponsors } = reconcileSponsors( targetEvent, airtableSponsors, - websiteSponsors + websiteSponsors, ); reconcileEvents(targetEvent, websiteEvents); @@ -116,14 +116,14 @@ const confirmation = await confirmUpdate( updatedSpeakers, updatedTalks, removedTalks, - updatedSponsors + updatedSponsors, ); if (confirmation) { await exportData(websiteSpeakers, "speakers", config.seattlejsProjectPath); const existingPhotos = await exportImages( newPhotos, "speakers", - config.seattlejsProjectPath + config.seattlejsProjectPath, ); await exportData(websiteTalks, "talks", config.seattlejsProjectPath); diff --git a/package-lock.json b/package-lock.json index e8698a9..a833f85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "eslint-plugin-promise": "^6.1.1", "lodash": "^4.17.21", "mocha": "^10.2.0", - "prettier": "2.8.3", + "prettier": "^3.0.0", "ts-node": "^10.9.1", "typescript": "^5.1.3" } @@ -3693,15 +3693,16 @@ } }, "node_modules/prettier": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", - "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, + "license": "MIT", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -7295,9 +7296,9 @@ "dev": true }, "prettier": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.3.tgz", - "integrity": "sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true }, "process": { diff --git a/package.json b/package.json index b175bd7..57d3727 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint-plugin-promise": "^6.1.1", "lodash": "^4.17.21", "mocha": "^10.2.0", - "prettier": "2.8.3", + "prettier": "^3.0.0", "ts-node": "^10.9.1", "typescript": "^5.1.3" }, diff --git a/src/events.ts b/src/events.ts index 04f675e..984a825 100644 --- a/src/events.ts +++ b/src/events.ts @@ -9,10 +9,10 @@ import { /** mutates the events json data to include any event updates */ export const reconcileEvents = ( event: WebsiteAirtablePair, - websiteEvents: WebsiteEvent[] + websiteEvents: WebsiteEvent[], ): void => { const existingEventIndex = websiteEvents.findIndex( - (webEvent) => webEvent.id == event.website.id + (webEvent) => webEvent.id == event.website.id, ); if (existingEventIndex > 0) { // the event exists, need to replace it with the updated one, @@ -24,14 +24,14 @@ export const reconcileEvents = ( }; export const makeWebsiteEvent = ( - airtableEvent: Record
+ airtableEvent: Record
, ): WebsiteEvent => { const name = (airtableEvent.get("Name") as string) || ""; const date = (airtableEvent.get("Date") as string) || ""; const description = (airtableEvent.get("Description") as string) || ""; const id = makeEventId(name); const link = (airtableEvent.get("Link") as string) || ""; - console.log("makeWebsiteEvent", {id, link}); + console.log("makeWebsiteEvent", { id, link }); const event: WebsiteEvent = { id: id, link, @@ -48,7 +48,7 @@ export const makeWebsiteEvent = ( * and the value is an object with the corresponding airtable and website events */ export const mapAirtableEventsToWebsiteEvents = ( airtableEvents: Record
[], - websiteEvents: WebsiteEvent[] + websiteEvents: WebsiteEvent[], ): WebsiteAirtableMap => { const result: WebsiteAirtableMap = {}; for (const event of airtableEvents) { diff --git a/src/normalizers.ts b/src/normalizers.ts index beaeca7..3887d60 100644 --- a/src/normalizers.ts +++ b/src/normalizers.ts @@ -62,7 +62,7 @@ export const getFileExtension = (fileName) => { }; export const normalizeTalkType = ( - talkType: string + talkType: string, ): "regular" | "lightning" => { if (talkType.toLowerCase().includes("regular")) { return "regular"; @@ -71,7 +71,7 @@ export const normalizeTalkType = ( }; export const handleTalkTopics = ( - talkTopics: string | undefined | "" + talkTopics: string | undefined | "", ): string[] => { if (talkTopics === "") { return []; diff --git a/src/repos/airtable-metadata.ts b/src/repos/airtable-metadata.ts index 0e164eb..8145106 100644 --- a/src/repos/airtable-metadata.ts +++ b/src/repos/airtable-metadata.ts @@ -54,16 +54,16 @@ const getSeattleJsBaseId = async (token: string): Promise => { }; export const getAirtableMetadata = async ( - token: string + token: string, ): Promise => { const baseId = await getSeattleJsBaseId(token); const tables = await getAirtableTables(baseId, token); const eventsTable = tables.find((table) => table.name === EVENTS_TABLE_NAME); const speakersTable = tables.find( - (table) => table.name === SPEAKERS_TABLE_NAME + (table) => table.name === SPEAKERS_TABLE_NAME, ); const sponsorsTable = tables.find( - (table) => table.name === SPONSORS_TABLE_NAME + (table) => table.name === SPONSORS_TABLE_NAME, ); const ids: AirtableMetadata = { baseId: baseId, diff --git a/src/repos/user-input.ts b/src/repos/user-input.ts index be89573..f82356b 100644 --- a/src/repos/user-input.ts +++ b/src/repos/user-input.ts @@ -27,7 +27,7 @@ const getDateMonthsInFuture = (monthsInFuture: number): Date => { }; export const getTargetEvent = async ( - events: WebsiteAirtableMap + events: WebsiteAirtableMap, ): Promise => { // reduce number of events to limit, taking most recent const someMonthsAgo = getDateMonthsAgo(MONTHS_PRIOR_LIMIT); @@ -57,14 +57,14 @@ export const confirmUpdate = async ( updatedSpeakers: WebsiteSpeaker[], updatedTalks: WebsiteTalk[], removedTalks: string[], - updatedSponsors: WebsiteSponsor[] + updatedSponsors: WebsiteSponsor[], ): Promise => { const confirmMessage = [ "Confirm update:\n", `${updatedTalks.length} new talks\n`, - `${removedTalks.length} removed talks ${ removedTalks.length ? `(${removedTalks})` : ''}\n`, + `${removedTalks.length} removed talks ${removedTalks.length ? `(${removedTalks})` : ""}\n`, `${updatedSponsors.length} new sponsors\n`, - `${updatedSpeakers.length} new speakers\n` + `${updatedSpeakers.length} new speakers\n`, ]; const res = await prompts({ type: "confirm", @@ -109,7 +109,7 @@ export const promptForApiToken = async (retries = 1): Promise => { }; export const promptForSeattlejsProjectPath = async ( - retries = 1 + retries = 1, ): Promise => { while (retries >= 0) { retries--; @@ -124,6 +124,6 @@ export const promptForSeattlejsProjectPath = async ( } } throw new Error( - "please provide a path to a valid seattlejs.com repo or fork" + "please provide a path to a valid seattlejs.com repo or fork", ); }; diff --git a/src/repos/website.ts b/src/repos/website.ts index 1d9ee0d..91d4a78 100644 --- a/src/repos/website.ts +++ b/src/repos/website.ts @@ -23,7 +23,7 @@ const JSON_FILES = { }; export const validateSeattleJsProjectPath = async ( - projectPath: string + projectPath: string, ): Promise => { for (const [type, file] of Object.entries(JSON_FILES)) { const fullPath = path.join(projectPath, file); @@ -40,23 +40,23 @@ const parseJSONFile = async (filePath: string): Promise => { }; export const getWebsiteEvents = async ( - projectPath: string + projectPath: string, ): Promise => { return parseJSONFile(path.join(projectPath, JSON_FILES["events"])); }; export const getWebsiteSpeakers = async ( - projectPath: string + projectPath: string, ): Promise => { return parseJSONFile(path.join(projectPath, JSON_FILES["speakers"])); }; export const getWebsiteTalks = async ( - projectPath: string + projectPath: string, ): Promise => { return parseJSONFile(path.join(projectPath, JSON_FILES["talks"])); }; export const getWebsiteSponsors = async ( - projectPath: string + projectPath: string, ): Promise => { return parseJSONFile(path.join(projectPath, JSON_FILES["sponsors"])); }; @@ -84,7 +84,7 @@ export const exportImages = async (imageObjects, type, projectPath) => { const filePath = path.join( projectPath, IMAGE_DIRS[type], - imageObj.filename + imageObj.filename, ); const imageExists = await exists(filePath); if (!imageExists) { diff --git a/src/speakers.ts b/src/speakers.ts index ffb10de..c1c745e 100644 --- a/src/speakers.ts +++ b/src/speakers.ts @@ -16,7 +16,7 @@ import { export const reconcileSpeakers = ( event: WebsiteAirtablePair, airtableSpeakers: Record
[], - websiteSpeakers: WebsiteSpeaker[] + websiteSpeakers: WebsiteSpeaker[], ): { updatedSpeakers: WebsiteSpeaker[]; newPhotos: AirtablePhoto[]; @@ -26,7 +26,7 @@ export const reconcileSpeakers = ( // get the speakers for the passed event const airtableEventSpeakers = getEventSpeakers( event.airtable, - airtableSpeakers + airtableSpeakers, ); for (const speaker of airtableEventSpeakers) { // make speaker object and get photo uri @@ -49,7 +49,7 @@ export const reconcileSpeakers = ( /** make a website speaker from an airtable speaker */ const makeWebsiteSpeaker = ( - airtableSpeaker: Record
+ airtableSpeaker: Record
, ): { speaker: WebsiteSpeaker; speakerPhoto: AirtablePhoto } => { const speaker = {} as WebsiteSpeaker; const name = airtableSpeaker.get("Full Name"); @@ -79,7 +79,7 @@ const makeWebsiteSpeaker = ( */ export const getEventSpeakers = ( airtableEvent, - airtableSpeakers + airtableSpeakers, ): Record
[] => { const speakerRecords = []; const speakerIds = (airtableEvent.get("Speakers") as string[]) || []; diff --git a/src/sponsors.ts b/src/sponsors.ts index b2ee5ac..62abf0e 100644 --- a/src/sponsors.ts +++ b/src/sponsors.ts @@ -14,7 +14,7 @@ import { normalizeSponsorName, getFileExtension } from "./normalizers.js"; export const reconcileSponsors = ( event: WebsiteAirtablePair, airtableSponsors: Record
[], - websiteSponsors: WebsiteSponsor[] + websiteSponsors: WebsiteSponsor[], ): { newLogos: AirtablePhoto[]; updatedSponsors: WebsiteSponsor[]; @@ -28,7 +28,7 @@ export const reconcileSponsors = ( if (airtableEventSponsorIds) { for (const airtableId of airtableEventSponsorIds) { airtableEventSponsors.push( - airtableSponsors.find((sponsor) => sponsor.id == airtableId) + airtableSponsors.find((sponsor) => sponsor.id == airtableId), ); } } @@ -57,12 +57,12 @@ export const reconcileSponsors = ( }; const makeWebsiteSponsor = ( - airtableSponsor: Record
+ airtableSponsor: Record
, ): { sponsor: WebsiteSponsor; logo: AirtablePhoto; } => { - const airtableName = airtableSponsor.get("Name") as string + const airtableName = airtableSponsor.get("Name") as string; const name = normalizeSponsorName(airtableName); const sponsor = {} as WebsiteSponsor; sponsor.id = name; diff --git a/src/talks.ts b/src/talks.ts index 055c00f..46d081f 100644 --- a/src/talks.ts +++ b/src/talks.ts @@ -12,7 +12,7 @@ import { getEventSpeakers } from "./speakers.js"; export const reconcileTalks = ( event: WebsiteAirtablePair, airtableSpeakers: Record
[], - websiteTalks: WebsiteTalk[] + websiteTalks: WebsiteTalk[], ): { updatedTalks: WebsiteTalk[]; removedTalks: string[]; @@ -21,7 +21,7 @@ export const reconcileTalks = ( const removedTalks = []; const airtableEventSpeakers = getEventSpeakers( event.airtable, - airtableSpeakers + airtableSpeakers, ); for (const speaker of airtableEventSpeakers) { newTalks.push(makeWebsiteTalk(speaker, event.airtable)); @@ -46,21 +46,21 @@ export const reconcileTalks = ( } } event.website.talks = event.website.talks.filter((talkid) => - newTalks.find((newTalk) => newTalk.id === talkid) + newTalks.find((newTalk) => newTalk.id === talkid), ); return { updatedTalks, removedTalks }; }; const makeWebsiteTalk = ( airtableSpeaker: Record
, - airtableEvent: Record
+ airtableEvent: Record
, ): WebsiteTalk => { const talk = {} as WebsiteTalk; const speakerId = makeSpeakerId(airtableSpeaker.get("Full Name") as string); const eventId = makeEventId(airtableEvent.get("Name") as string); const id = makeTalkId(speakerId, eventId); const talkType = normalizeTalkType( - (airtableSpeaker.get("Talk Type") as string) || "" + (airtableSpeaker.get("Talk Type") as string) || "", ); talk.id = id; talk.speaker_id = speakerId; diff --git a/test/normalizers.test.ts b/test/normalizers.test.ts index a8f04ee..da94d52 100644 --- a/test/normalizers.test.ts +++ b/test/normalizers.test.ts @@ -5,14 +5,14 @@ import { handleTalkTopics } from "../src/normalizers.js"; describe("getTalkTopics", function () { describe("should handle when topics exist", function () { const topics = handleTalkTopics( - airtableSpeakers[0].get("Topics") as string + airtableSpeakers[0].get("Topics") as string, ); const expectedTopics = (airtableSpeakers[0].get("Topics") as string).split( - ", " + ", ", ); assert( topics === expectedTopics, - `topics ${topics} did not match ${expectedTopics}` + `topics ${topics} did not match ${expectedTopics}`, ); }); describe("should handle when topics don't exist", function () { @@ -20,11 +20,11 @@ describe("getTalkTopics", function () { const emptyStringTopics = handleTalkTopics(""); assert( Array.isArray(undefinedTopics) && undefinedTopics.length === 0, - "should handle undefined" + "should handle undefined", ); assert( Array.isArray(emptyStringTopics) && emptyStringTopics.length === 0, - "should handle empty string" + "should handle empty string", ); }); }); diff --git a/test/speakers.spec.ts b/test/speakers.spec.ts index 9d02b28..770319f 100644 --- a/test/speakers.spec.ts +++ b/test/speakers.spec.ts @@ -13,12 +13,12 @@ describe("reconcileSpeakers", function () { const { updatedSpeakers } = reconcileSpeakers( targetEvent, airtableSpeakers, - webSpeakers + webSpeakers, ); it("returns the right number of speakers", function () { assert( updatedSpeakers.length === 3, - `returned ${updatedSpeakers.length} instead of 3` + `returned ${updatedSpeakers.length} instead of 3`, ); }); it("returns the correct speakers", function () { @@ -26,9 +26,9 @@ describe("reconcileSpeakers", function () { for (const correctSpeaker of correctSpeakerIds) { assert( updatedSpeakers.find( - (updatedSpeaker) => updatedSpeaker.id == correctSpeaker + (updatedSpeaker) => updatedSpeaker.id == correctSpeaker, ), - `${correctSpeaker} not found in ${updatedSpeakers}` + `${correctSpeaker} not found in ${updatedSpeakers}`, ); } }); @@ -36,23 +36,23 @@ describe("reconcileSpeakers", function () { describe("should handle adding a new speaker to existing speakers", function () { // take cristina out of speakers json const webSpeakers = websiteSpeakers.filter( - (speaker) => !speaker.id.includes("cristina") + (speaker) => !speaker.id.includes("cristina"), ); const { updatedSpeakers } = reconcileSpeakers( targetEvent, airtableSpeakers, - webSpeakers + webSpeakers, ); it("returns the right number of speakers", function () { assert( updatedSpeakers.length === 1, - `returned ${updatedSpeakers.length} instead of 1` + `returned ${updatedSpeakers.length} instead of 1`, ); }); it("returns the correct speaker", function () { assert( updatedSpeakers.find((speaker) => speaker.id.includes("cristina")), - "reconcileSpeakers() didn't return missing speaker" + "reconcileSpeakers() didn't return missing speaker", ); }); }); diff --git a/test/talks.spec.ts b/test/talks.spec.ts index b250a1a..9e8a19f 100644 --- a/test/talks.spec.ts +++ b/test/talks.spec.ts @@ -23,27 +23,27 @@ describe("reconcileTalks", function () { const { updatedTalks } = reconcileTalks( te, airtableSpeakers, - emptyWebTalks + emptyWebTalks, ); it("should return the right talks", function () { const updatedTalkIds = updatedTalks.map((talk) => talk.id); assert( updatedTalkIds.every((id) => correctTalkIds.includes(id)), - `updated talks: ${updatedTalkIds} don't match expected talks: ${correctTalkIds}` + `updated talks: ${updatedTalkIds} don't match expected talks: ${correctTalkIds}`, ); assert( updatedTalks.length === 3, - `returned ${updatedTalks.length} instead of 3` + `returned ${updatedTalks.length} instead of 3`, ); }); it("should update the event json", function () { assert( te.website.talks.length === 3, - `event has ${te.website.talks.length} instead of 3` + `event has ${te.website.talks.length} instead of 3`, ); assert( te.website.talks.every((id) => correctTalkIds.includes(id)), - `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}` + `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}`, ); }); }); @@ -51,7 +51,7 @@ describe("reconcileTalks", function () { const te = _.cloneDeep(targetEvent); // remove aiden from event json te.website.talks = te.website.talks.filter( - (talkId) => !talkId.includes("aiden") + (talkId) => !talkId.includes("aiden"), ); // remove aiden from talks json const webTalks = websiteTalks.filter((talk) => !talk.id.includes("aiden")); @@ -62,21 +62,21 @@ describe("reconcileTalks", function () { const updatedTalkIds = updatedTalks.map((talk) => talk.id); assert( updatedTalkIds[0] === correctTalkId, - `updated talks: ${updatedTalkIds} don't match expected talks: ${correctTalkIds}` + `updated talks: ${updatedTalkIds} don't match expected talks: ${correctTalkIds}`, ); assert( updatedTalks.length === 1, - `returned ${updatedTalks.length} instead of 3` + `returned ${updatedTalks.length} instead of 3`, ); }); it("should update the event json", function () { assert( te.website.talks.length === 3, - `event has ${te.website.talks.length} instead of 3` + `event has ${te.website.talks.length} instead of 3`, ); assert( te.website.talks.every((id) => correctTalkIds.includes(id)), - `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}` + `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}`, ); }); }); @@ -84,23 +84,23 @@ describe("reconcileTalks", function () { const te = _.cloneDeep(targetEvent); // remove dm from events json but not from talks json te.websiteTalks = te.website.talks.filter( - (talkId) => !talkId.includes("dm-liao") + (talkId) => !talkId.includes("dm-liao"), ); const { updatedTalks } = reconcileTalks(te, airtableSpeakers, websiteTalks); it("should return no talks to update", function () { assert( updatedTalks.length === 0, - `${updatedTalks.length} talks were returned, expected 0` + `${updatedTalks.length} talks were returned, expected 0`, ); }); it("should update the event json", function () { assert( te.website.talks.length === 3, - `event has ${te.website.talks.length} instead of 3` + `event has ${te.website.talks.length} instead of 3`, ); assert( te.website.talks.every((id) => correctTalkIds.includes(id)), - `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}` + `correct talks: ${correctTalkIds} doesn't match event talks: ${te.website.talks}`, ); }); }); @@ -109,20 +109,20 @@ describe("reconcileTalks", function () { let as = _.cloneDeep(airtableSpeakers); // remove one of the speakers from airtable to simulate a speaker who can't make it as = as.filter( - (speaker) => !speaker.get("Full Name").toLowerCase().includes("liao") + (speaker) => !speaker.get("Full Name").toLowerCase().includes("liao"), ); const { removedTalks } = reconcileTalks(te, as, websiteTalks); it("should return the correct number of removed talks", function () { assert( removedTalks.length === 1, - `${removedTalks.length} removed talks were returned, expected 1` + `${removedTalks.length} removed talks were returned, expected 1`, ); }); it("should update the event json", function () { assert( te.website.talks.length === 2, - `event has ${te.website.talks.length} instead of 2` + `event has ${te.website.talks.length} instead of 2`, ); }); });