From 828c6fb7c55718aaba34143c132d760196307749 Mon Sep 17 00:00:00 2001 From: Daniel Kurowski <daniel.kurowski@grifart.cz> Date: Sat, 30 May 2020 07:21:04 +0200 Subject: [PATCH] Added integration test --- .npmignore | 1 - README.md | 2 +- demo.html => src/integrationTest.html | 6 ++++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename demo.html => src/integrationTest.html (99%) diff --git a/.npmignore b/.npmignore index 9f5475f..b80d64b 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,6 @@ .idea/ .rpt2_cache/ .babelrc -demo.html rollup.config.js tsconfig.json yarn.lock diff --git a/README.md b/README.md index e7898a4..a69c457 100644 --- a/README.md +++ b/README.md @@ -44,4 +44,4 @@ yarn install yarn dev ``` -If you need to check visually how the smooth scrolling behaviour acts like, you can take advantage of a testing file `demo.html` which has some lorem ipsum data and few of links to navigate through the content and test smooth scrolling. +Every piece of this library comes with its unit test sitting alongside the script. Whole library is covered by integration test sitting in `src` folder. diff --git a/demo.html b/src/integrationTest.html similarity index 99% rename from demo.html rename to src/integrationTest.html index d1f1655..2939868 100644 --- a/demo.html +++ b/src/integrationTest.html @@ -3,9 +3,9 @@ <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> - <title>Visual test of smoothscroll</title> + <title>Integration test</title> <script src="https://cdn.jsdelivr.net/npm/velocity-animate@1.5/velocity.min.js"></script> - <script src="dist/index.js" type="text/javascript"></script> + <script src="../dist/index.js" type="text/javascript"></script> <script> SmoothScroll.enable({ scrollOnLoad: true, @@ -34,6 +34,8 @@ </style> </head> <body> +<!-- @todo: improve this file --> + <div id="nahoru"></div> <a href="#item1">Item1</a> <a href="#item2">Item2</a> -- GitLab