Skip to content

Commit

Permalink
fix: specs (#123)
Browse files Browse the repository at this point in the history
Signed-off-by: nikkeyl <131481562+nikkeyl@users.noreply.github.com>
Co-authored-by: nikkeyl <131481562+nikkeyl@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and nikkeyl authored Jan 14, 2025
1 parent ccc5f90 commit fb79338
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions specs/selectors.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { describe, expect, test as spec } from 'bun:test';
import { selectors } from '#src/index.ts';

describe('Nested Selectors Regex', async () => {
const NESTED_ATTRIBUTE = selectors.nested.ATTRIBUTE_REGEX;
const NESTED_CLASS = selectors.nested.CLASS_REGEX;
const NESTED_MODIFIER = selectors.nested.MODIFIER_REGEX;
const NESTED_ATTRIBUTE = selectors.ATTRIBUTE_REGEX;
const NESTED_CLASS = selectors.CLASS_REGEX;
const NESTED_MODIFIER = selectors.MODIFIER_REGEX;

spec('should &[attribute]', async () => {
expect('&[attribute]').toMatch(new RegExp(`&${NESTED_ATTRIBUTE}`));
Expand Down
4 changes: 2 additions & 2 deletions src/validators/selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const selectors = {
NESTED_CLASS_REGEX,
NESTED_CLASS_SIBLING_REGEX,
SIBLING_REGEX,
ELEMENT_REGEX: `&${ELEMENT_S_REGEX}`,
MODIFIER_REGEX: `&${MODIFIER_S_REGEX}`,
ELEMENT_REGEX: ELEMENT_S_REGEX,
MODIFIER_REGEX: MODIFIER_S_REGEX,
bem: {
BLOCK_REGEX,
ELEMENT_REGEX,
Expand Down

0 comments on commit fb79338

Please sign in to comment.