mirror of
https://github.com/penpot/penpot.git
synced 2025-01-25 07:58:49 -05:00
🎉 Add tests for svgc.
This commit is contained in:
parent
b252b55c85
commit
5ee6897ce6
1 changed files with 24 additions and 0 deletions
24
backend/tests/app/tests/test_svgc.clj
Normal file
24
backend/tests/app/tests/test_svgc.clj
Normal file
|
@ -0,0 +1,24 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; This Source Code Form is "Incompatible With Secondary Licenses", as
|
||||
;; defined by the Mozilla Public License, v. 2.0.
|
||||
;;
|
||||
;; Copyright (c) 2021 UXBOX Labs SL
|
||||
|
||||
(ns app.tests.test-svgc
|
||||
(:require
|
||||
[app.tests.helpers :as th]
|
||||
[clojure.java.io :as io]
|
||||
[clojure.test :as t]
|
||||
[mockery.core :refer [with-mocks]]))
|
||||
|
||||
(t/use-fixtures :once th/state-init)
|
||||
|
||||
(t/deftest run-svgc-over-sample-file
|
||||
(let [svgc (:app.svgparse/svgc th/*system*)
|
||||
data (slurp (io/resource "app/tests/_files/sample1.svg"))
|
||||
res (svgc data)]
|
||||
(t/is (string? res))
|
||||
(t/is (= 2533 (count res)))))
|
Loading…
Add table
Reference in a new issue