mirror of
https://github.com/stablyai/orca.git
synced 2026-11-06 03:57:35 +00:00
Add Ruby task/configuration filenames to the existing generated language associations. Co-authored-by: ggbdpq <ggbdpq@gmail.com> Co-authored-by: Neil <neil@stably.ai>
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
import { readFileSync } from 'node:fs'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { associationsPath, readMonacoAssociations } from './generate-monaco-associations.mjs'
|
|
|
|
describe('Monaco filename associations', () => {
|
|
it('matches the installed editor registrations and curated Orca associations', () => {
|
|
expect(
|
|
JSON.parse(readFileSync(associationsPath, 'utf8')),
|
|
'Run node config/scripts/generate-monaco-associations.mjs after changing associations or Monaco'
|
|
).toEqual(readMonacoAssociations())
|
|
})
|
|
|
|
it('keeps built-in Ruby aliases alongside the curated Ruby associations', () => {
|
|
expect(readMonacoAssociations().find((language) => language.id === 'ruby')).toEqual({
|
|
id: 'ruby',
|
|
extensions: expect.arrayContaining([
|
|
'.rb',
|
|
'.rbx',
|
|
'.rjs',
|
|
'.gemspec',
|
|
'.pp',
|
|
'.rake',
|
|
'.ru',
|
|
'.jbuilder',
|
|
'.thor'
|
|
]),
|
|
filenames: expect.arrayContaining([
|
|
'rakefile',
|
|
'Gemfile',
|
|
'Guardfile',
|
|
'Capfile',
|
|
'Podfile',
|
|
'Brewfile',
|
|
'Vagrantfile'
|
|
])
|
|
})
|
|
})
|
|
})
|