mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 00:52:09 +03:00
48a5599eb6
Fixes #8788 - Fixed missing argument lists on constructors, and improved handling for various cases of partially applied functions. - Extended tests to check for correct `self` argument placeholders. - Additionally reworked some questionable test code to maintain separation between server and client code. <img width="1241" alt="image" src="https://github.com/enso-org/enso/assets/919491/5377f57f-18f0-4a50-a8ab-9331862ca547">
29 lines
455 B
TypeScript
29 lines
455 B
TypeScript
import { combineFileParts, splitFileContents } from 'shared/ensoFile'
|
|
import { expect, test } from 'vitest'
|
|
|
|
const cases = [
|
|
`foo`,
|
|
`foo
|
|
|
|
|
|
#### METADATA ####
|
|
[]
|
|
{}`,
|
|
`a "#### METADATA ####"`,
|
|
`a
|
|
|
|
|
|
#### METADATA ####
|
|
|
|
|
|
#### METADATA ####
|
|
[]
|
|
{}`,
|
|
]
|
|
|
|
test.each(cases)('File split and combine roundtrip $#', (contents) => {
|
|
const parts = splitFileContents(contents)
|
|
const combined = combineFileParts(parts)
|
|
expect(combined).toEqual(contents)
|
|
})
|