Improve editor and cookie-consent test coverage, fix RegExp.exec lint
- Add 5 editor tests: toolbar mousedown, _sync, exec with/without value - Mock document.execCommand for happy-dom compatibility - Add cookie-consent test for duplicate script guard - Use RegExp.exec() instead of String.match() per ESLint rule Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ const COOKIE_NAME = 'e_ticket_consent'
|
||||
const COOKIE_DAYS = 365
|
||||
|
||||
function getCookie(name) {
|
||||
const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'))
|
||||
const match = new RegExp('(^| )' + name + '=([^;]+)').exec(document.cookie)
|
||||
|
||||
return match ? match[2] : null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user