From b07a04fb35e378a73d1fb6cd8fa0f0cc51a70ecf Mon Sep 17 00:00:00 2001 From: Jeremy Thomas Date: Sat, 7 Nov 2020 11:50:37 +0000 Subject: [PATCH] Add dart tests --- .travis.yml | 18 +++-- test/dart-sass.js | 79 +++++++++++++++++++ test/{sass-compile-tester.sh => ruby-sass.sh} | 0 3 files changed, 91 insertions(+), 6 deletions(-) create mode 100644 test/dart-sass.js rename test/{sass-compile-tester.sh => ruby-sass.sh} (100%) diff --git a/.travis.yml b/.travis.yml index 5c64a5a6..b85c060f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,12 @@ -script: - - "test/sass-compile-tester.sh" - -language: sass -before_install: - - gem install sass \ No newline at end of file +matrix: + include: + - language: sass + before_install: + - gem install sass + script: + - test/ruby-sass.sh + - language: node_js + before_install: + - npm i -g sass + script: + - node test/dart-sass.js diff --git a/test/dart-sass.js b/test/dart-sass.js new file mode 100644 index 00000000..3ab82f29 --- /dev/null +++ b/test/dart-sass.js @@ -0,0 +1,79 @@ +const sass = require('sass'); + +const sources = [ + `base/animations.sass`, + `base/generic.sass`, + `base/minireset.sass`, + + `components/breadcrumb.sass`, + `components/card.sass`, + `components/dropdown.sass`, + `components/level.sass`, + `components/media.sass`, + `components/menu.sass`, + `components/message.sass`, + `components/modal.sass`, + `components/navbar.sass`, + `components/pagination.sass`, + `components/panel.sass`, + `components/tabs.sass`, + + `elements/box.sass`, + `elements/button.sass`, + `elements/container.sass`, + `elements/content.sass`, + `elements/icon.sass`, + `elements/image.sass`, + `elements/notification.sass`, + `elements/other.sass`, + `elements/progress.sass`, + `elements/table.sass`, + `elements/tag.sass`, + `elements/title.sass`, + + `form/checkbox-radio.sass`, + `form/file.sass`, + `form/input-textarea.sass`, + `form/select.sass`, + `form/tools.sass`, + + `grid/columns.sass`, + `grid/tiles.sass`, + + `helpers/color.sass`, + `helpers/flexbox.sass`, + `helpers/float.sass`, + `helpers/other.sass`, + `helpers/overflow.sass`, + `helpers/position.sass`, + `helpers/spacing.sass`, + `helpers/typography.sass`, + `helpers/visibility.sass`, + + `layout/footer.sass`, + `layout/hero.sass`, + `layout/section.sass`, + + `utilities/controls.sass`, + `utilities/derived-variables.sass`, + `utilities/functions.sass`, + `utilities/initial-variables.sass`, + `utilities/mixins.sass`, +]; + +const BULMA_SASS_PATH = `./sass/`; + +sources.forEach(source => { + const result = sass.renderSync({ + data: `@use "${BULMA_SASS_PATH}${source}";`, + outputStyle: "expanded" + }); + + try { + sass.renderSync({ + data: `@use "${BULMA_SASS_PATH}${source}";`, + }); + } catch(err) { + console.error(err); + } +}); diff --git a/test/sass-compile-tester.sh b/test/ruby-sass.sh similarity index 100% rename from test/sass-compile-tester.sh rename to test/ruby-sass.sh