mirror of
https://github.com/sky-systems/sky_phone.git
synced 2026-08-29 04:01:32 +00:00
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:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user