Update a lesson's test to support trailing commas

The assignment “Use Destructuring Assignment to Assign Variables from Nested Objects” uses a regex that does not support leading-comma destructuring (such as { property: alias, /* ← this */ }).

The lowToday and highToday test case regexes should be updated to include this syntax: /(var|const|let)\s*{\s*today\s*:\s*{\s*(high\s*:\s*highToday[^}]*|[^,]*,\s*high\s*:\s*highToday,?\s*)}\s*}\s*=\s*LOCAL_FORECAST(;|\s+|\/\/)/g (changed highToday\s* to highToday,?\s*)

It half supports adding extra unneeded commas. Should be an easy fix.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.