We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eced9c3 commit a7d881aCopy full SHA for a7d881a
1 file changed
test/tests/submodule.js
@@ -0,0 +1,27 @@
1
+var assert = require("assert");
2
+var path = require("path");
3
+var local = path.join.bind(path, __dirname);
4
+
5
+describe("Submodule", function() {
6
+ var NodeGit = require("../../");
7
+ var Repository = NodeGit.Repository;
8
+ var Submodule = NodeGit.Submodule;
9
+ var repoPath = local("../repos/workdir");
10
11
+ beforeEach(function() {
12
+ var test = this;
13
14
+ return Repository.open(repoPath)
15
+ .then(function(repo) {
16
+ test.repository = repo;
17
+ });
18
19
20
+ it("can walk over the submodules", function() {
21
+ return Submodule.foreach(this.repository, function(submodule,
22
+ name, context) {
23
+ assert.equal(name, "vendor/libgit2");
24
+ assert.notEqual(submodule, null);
25
26
27
+});
0 commit comments