Skip to content

Commit 4573000

Browse files
committed
feat: Add not conditions assertions
Based on PHP-SDK discussion featurevisor/featurevisor-php#8 (comment)
1 parent 523f502 commit 4573000

2 files changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
description: Not Chrome v1 browser
2+
conditions:
3+
- not:
4+
- attribute: browser.name
5+
operator: equals
6+
value: chrome
7+
- attribute: browser.version
8+
operator: equals
9+
value: "1.0"
10+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
segment: notChromeV1
2+
assertions:
3+
##
4+
# Match
5+
#
6+
- context:
7+
browser:
8+
name: chrome
9+
expectedToMatch: true
10+
11+
- context:
12+
browser:
13+
name: chrome
14+
version: 2.0
15+
expectedToMatch: true
16+
17+
- context:
18+
browser:
19+
name: firefox
20+
version: 1.0
21+
expectedToMatch: true
22+
23+
##
24+
# Not match
25+
#
26+
- context:
27+
browser:
28+
name: chrome
29+
version: 1.0
30+
expectedToMatch: false

0 commit comments

Comments
 (0)