From c790deef02ca14d6a29b454f57023f1f29178800 Mon Sep 17 00:00:00 2001 From: Travis Rollins Date: Thu, 30 Nov 2023 10:04:40 -0800 Subject: [PATCH] Add note about separating data and dom logic in whats cookin project --- projects/module-2/whats-cookin-part-one.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/module-2/whats-cookin-part-one.md b/projects/module-2/whats-cookin-part-one.md index 8522bb9fd..bf12e8ab4 100644 --- a/projects/module-2/whats-cookin-part-one.md +++ b/projects/module-2/whats-cookin-part-one.md @@ -201,6 +201,11 @@ Instead, for your tests, you should create small, sample datasets that match the - DOM manipulation / DOM manipulating functions (likeĀ `document.querySelector(...)`) - Fetch calls +
+### Note + +Make sure to keep your data logic in separate files from the `scripts.js`, such as the `recipes.js` file in the boilerplate. References to the DOM like `querySelectors`, `eventListeners`, and more will break your tests as the DOM does not exist in the testing environment. +
--- ### Extension Options