Skip to content

Commit

Permalink
Merge pull request #25 from getlang-dev/chores
Browse files Browse the repository at this point in the history
chore: selsyn
  • Loading branch information
mattfysh authored Dec 1, 2024
2 parents e7dfc84 + 42a51fb commit 1ebda50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions test/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import dedent from 'dedent'
import { dump } from 'js-yaml'

const DEBUG = Boolean(process.env.AST)
export const SELSYN = true

function printYaml(ast: Program) {
console.log('\n---- execute ast ----')
Expand Down
8 changes: 4 additions & 4 deletions test/values.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
NullSelectionError,
SelectorSyntaxError,
} from '@getlang/utils'
import { helper } from './helpers.js'
import { SELSYN, helper } from './helpers.js'

const { execute, testIdempotency } = helper()

Expand Down Expand Up @@ -178,7 +178,7 @@ describe('values', () => {
expect(result).toEqual('welcome')
})

test('css parsing error @selsyn', () => {
test.if(SELSYN)('css parsing error', () => {
const result = execute(`
set html = \`'<div>test</div>'\`
extract $html -> @html -> p/*&@#^
Expand All @@ -204,7 +204,7 @@ describe('values', () => {
expect(result).toEqual('intro')
})

test('xpath parsing error @selsyn', async () => {
test.if(SELSYN)('xpath parsing error', async () => {
const result = execute(`
set html = \`'<div>test</div>'\`
extract $html -> @html -> xpath:p/*&@#^
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('values', () => {
expect(result.child).toEqual(2)
})

test('esquery parsing error @selsyn', () => {
test.if(SELSYN)('esquery parsing error', () => {
const result = execute(`
set js = \`'console.log(1 + 2)'\`
extract $js -> @js -> Litera#$*& ><<>F
Expand Down

0 comments on commit 1ebda50

Please sign in to comment.