From 40f9680c6a373078a1c885f70cfbc685081f9b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20M=C3=BCnch?= Date: Sat, 31 Oct 2020 11:34:49 +0100 Subject: [PATCH] Add additional test for sass profile --- internal/profile/validator/path_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/profile/validator/path_test.go b/internal/profile/validator/path_test.go index dc407a4..81ccd92 100644 --- a/internal/profile/validator/path_test.go +++ b/internal/profile/validator/path_test.go @@ -36,3 +36,14 @@ func TestDefaultProfile(t *testing.T) { assert.True(t, IsPathValid("foo.html", selectedProfile)) assert.True(t, IsPathValid("foo.xyz", selectedProfile)) } + +func TestSASSProfile(t *testing.T) { + selectedProfile := "sass" + + assert.False(t, IsPathValid("foo/node_modules/test.js", selectedProfile)) + assert.False(t, IsPathValid(".git/config", selectedProfile)) + assert.False(t, IsPathValid("foo/.git/config", selectedProfile)) + + assert.True(t, IsPathValid("foo.sass", selectedProfile)) + assert.True(t, IsPathValid("foo.scss", selectedProfile)) +}