FIX - normalize contract test line endings

Normalize source fixtures before newline-sensitive assertions so the Companies and Notes contract tests behave consistently on Windows and Unix checkouts.
This commit is contained in:
smx.pusha
2026-08-18 07:32:01 +02:00
parent 77c1790f8b
commit a917d9eba0
4 changed files with 9 additions and 9 deletions
@@ -5,19 +5,19 @@ import { describe, expect, it } from 'vitest'
const client = readFileSync(
new URL('../../sky_phone/source/client/main.lua', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const companiesServer = readFileSync(
new URL('../../sky_phone/source/server/companies.lua', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const callsServer = readFileSync(
new URL('../../sky_phone/source/server/calls.lua', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const companiesStore = readFileSync(
new URL('./stores/companies.ts', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const apostrophe = String.fromCharCode(39)
const quote = String.fromCharCode(34)
@@ -5,7 +5,7 @@ import { describe, expect, it } from 'vitest'
const source = readFileSync(
new URL('./CompaniesApp.vue', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const scriptSource = source.slice(0, source.indexOf('</script>'))
const requestBranchStart = source.indexOf(
'<template v-else-if="screen === \'request\'">',
@@ -5,7 +5,7 @@ import { describe, expect, it } from 'vitest'
const source = readFileSync(
new URL('./CompaniesApp.vue', import.meta.url),
'utf8',
)
).replace(/\r\n/g, '\n')
const apostrophe = String.fromCharCode(39)
const quote = String.fromCharCode(34)
@@ -10,10 +10,10 @@ const menuSource = source.slice(
source.indexOf('<SkyActionSheet'),
source.indexOf('</SkyActionSheet>') + '</SkyActionSheet>'.length,
)
const listSource = source.slice(
source.indexOf('<sky-app-page\n v-if="!editorOpened"'),
source.indexOf('<sky-app-page v-else'),
const listStart = source.search(
/<sky-app-page\r?\n\s+v-if="!editorOpened"/,
)
const listSource = source.slice(listStart, source.indexOf('<sky-app-page v-else'))
describe('NotesApp list controls', () => {
it('places the Sky searchbar and create action together at the bottom', () => {