Conversation
| grunt.config(['symlink', 'config'], { | ||
| src: '<%= config.srcPaths.drupal %>/config', | ||
| dest: drupal.configPath() | ||
| }); |
There was a problem hiding this comment.
This code works just fine, but it does read as out of order to add the task before defining it.
test/build.js
Outdated
| var src = fs.existsSync('src/config'); | ||
| if (src) { | ||
| fs.existsSync('build/html/config', function(exists) { | ||
| assert.ok(exists); |
There was a problem hiding this comment.
Maybe I'm fuzzy on this, but if we have a test where the src/config doesn't exist, we should confirm the build/html/config doesn't exist. If we don't, why include the check?
|
Does this deprecate #323? |
84c6416 to
4e486b6
Compare
test/build.js
Outdated
| done(); | ||
| } else if (html && !src) { | ||
| assert.ok(false, 'Error: build/html/config exists but src/config does not'); | ||
| done(); |
There was a problem hiding this comment.
I appreciate the thoroughness here. Do we have Drupal 7 test cases executing that won't have the config directory? If so, that seems like it deserves a separate test case.
|
Re-triggering travis tests. |
…e exists at 'src/config' * Adding documentation to 10_BUILD.md in reference to the config directory. * Updating the test (build.js) to use fs.existsSync for my test * Reorder task/definition, Rewrite the test for the config directories * Add a test case for both Drupal 8 & 7
4e486b6 to
76c20a9
Compare
| it('config directory should exist if provided ', function(done) { | ||
| var src = fs.existsSync('src/config'); | ||
| var html = fs.existsSync('build/html/config'); | ||
| if (drupalCore === '8') { |
There was a problem hiding this comment.
I believe strict equality is fine here based on what I'm seeing here:
Setting environment variables from .travis.yml
$ export NVM_NODE_VERSION="4"
$ export GDT_DRUPAL_CORE="7"
|
@grayside added a couple checks for D8 and D7 to the tests https://github.com/phase2/grunt-drupal-tasks/pull/330/files#diff-2574f2eb25909e68dd1489311fbcd115 |
No description provided.