This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Exposing lexical information in TS frontend app #22
- Loading branch information
1 parent
821b7cb
commit 70e8da5
Showing
5 changed files
with
58 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns api-modelling-framework.core-test | ||
#?(:cljs (:require-macros [cljs.test :refer [deftest is async]] | ||
[cljs.core.async.macros :refer [go]])) | ||
(:require #?(:clj [clojure.test :refer :all]) | ||
#?(:clj [clojure.core.async :refer [go <! >! chan]]) | ||
#?(:clj [api-modelling-framework.platform :refer [async]]) | ||
#?(:clj [clojure.test :refer [deftest is]]) | ||
[api-modelling-framework.utils-test :refer [cb->chan error?]] | ||
#?(:cljs [cljs.core.async :refer [<! >! chan]]) | ||
[api-modelling-framework.core :as core])) | ||
|
||
(deftest lexical-info-test | ||
(async done | ||
(go | ||
(let [parser (core/->RAMLParser) | ||
generator (core/->OpenAPIGenerator) | ||
model (<! (cb->chan (partial core/parse-file parser "resources/world-music-api/wip.raml"))) | ||
id #?(:cljs "file://resources/world-music-api/wip.raml#/api-documentation/end-points/0/post/body" | ||
:clj "resources/world-music-api/wip.raml#/api-documentation/end-points/0/post/body") | ||
info(core/lexical-info-for-unit model "raml" id)] | ||
(is (some? info)) | ||
(done))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters