Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests #63

Merged
merged 5 commits into from
Dec 30, 2018
Merged

Tests #63

merged 5 commits into from
Dec 30, 2018

Conversation

m-adler
Copy link
Contributor

@m-adler m-adler commented Dec 21, 2018

Not sure you're interested in reactivating the commented-out tests.
I think it's better to have some simple tests than none.
I marked a failing test as todo instead of deleting it because I don't know how far it reflects the desired behavior. This way, the issue with this test can be addressed later without losing track of it.

@btecu
Copy link
Owner

btecu commented Dec 21, 2018

I agree, it would be good to have some tests. Is that something you'd be interested in working on?

@m-adler
Copy link
Contributor Author

m-adler commented Dec 22, 2018

Just added somt tests. I also removed the test that was marked as todo, because it turned out that this test was testing unintended behaviour.
The ESLint ember/no-attrs-in-components error is now also ignored. I created the issue #64 to keep track on this.

@m-adler
Copy link
Contributor Author

m-adler commented Dec 30, 2018

By the way ...
The dedicated ESLint check (eslint .) could be removed in the test.
https://travis-ci.org/btecu/ember-cli-bootstrap-datetimepicker/jobs/471230102#L531
This one seems to use slightly different rules for validation than ember, so there is still one error.
However, I think that you can still remove it, since ember test also validates it.

@btecu
Copy link
Owner

btecu commented Dec 30, 2018

Wouldn't an updated blueprint take care of that check if that was the case?

@m-adler
Copy link
Contributor Author

m-adler commented Dec 30, 2018

I have to admit that I have no idea by whom or what the test at https://travis-ci.org/btecu/ember-cli-bootstrap-datetimepicker/jobs/471230102 was created.

If it is completely generated from the .travis.yml, there is nothing to change on that file according to ember init.
But there are suggested changes for tests/dummy/config/environment.js.

? Overwrite tests/dummy/config/environment.js? Diff
Index: /home/m-adler/ember-cli-bootstrap-datetimepicker/tests/dummy/config/environment.js
===================================================================
--- /home/m-adler/ember-cli-bootstrap-datetimepicker/tests/dummy/config/environment.js
+++ /home/m-adler/ember-cli-bootstrap-datetimepicker/tests/dummy/config/environment.js
@@ -6,12 +6,15 @@
     environment,
     rootURL: '/',
     locationType: 'auto',
     EmberENV: {
-      EXTEND_PROTOTYPES: false,
       FEATURES: {
         // Here you can enable experimental features on an ember canary build
         // e.g. 'with-controller': true
+      },
+      EXTEND_PROTOTYPES: {
+        // Prevent Ember Data from overriding Date.parse.
+        Date: false
       }
     },

     APP: {
@@ -40,9 +43,9 @@
     ENV.APP.autoboot = false;
   }

   if (environment === 'production') {
-
+    // here you can enable a production-specific feature
   }

   return ENV;
 };

Adding the comment should also satisfy the last failed test.

@btecu
Copy link
Owner

btecu commented Dec 30, 2018

Yes, either adding the comment or removing the if block seems fine.

The comment line from the ember project template was inserted to satisfy
the linter.
@m-adler
Copy link
Contributor Author

m-adler commented Dec 30, 2018

Done

@btecu btecu merged commit 70e8105 into btecu:master Dec 30, 2018
@btecu
Copy link
Owner

btecu commented Dec 30, 2018

Thanks!

@m-adler m-adler deleted the tests branch December 30, 2018 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants