Skip to content

Commit

Permalink
Switch expectation ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
bplatz committed Aug 20, 2024
1 parent 90a64c8 commit 0717330
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions test/fluree/json_ld/impl/iri_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@
(deftest prefix-parsing
(testing "Prefix parsing returns prefix and suffix correctly"

(is (= (iri/parse-prefix "schema:name") ["schema" "name"]))
(is (= ["schema" "name"]
(iri/parse-prefix "schema:name")))

(is (= (iri/parse-prefix "fluree:some/namespace") ["fluree" "some/namespace"]))
(is (= ["fluree" "some/namespace"]
(iri/parse-prefix "fluree:some/namespace")))

(is (= (iri/parse-prefix "ex:a") ["ex" "a"]))
(is (= ["ex" "a"]
(iri/parse-prefix "ex:a")))

(is (= (iri/parse-prefix "a:b") ["a" "b"]))
(is (= ["a" "b"]
(iri/parse-prefix "a:b")))

(is (= [":" "schema:name"]
(iri/parse-prefix ":schema:name")))

(is (= [":" "schema"]
(iri/parse-prefix ":schema")))

(is (nil? (iri/parse-prefix "fluree/some:namespace")))

(is (nil? (iri/parse-prefix "fluree/cool")))

(is (nil? (iri/parse-prefix "schema::name")))

(is (= (iri/parse-prefix ":schema:name") [":" "schema:name"]))

(is (= (iri/parse-prefix ":schema") [":" "schema"]))

(is (nil? (iri/parse-prefix "schema:")))

(is (nil? (iri/parse-prefix "schema:/name")))
Expand Down

0 comments on commit 0717330

Please sign in to comment.