MCPcopy Create free account
hub / github.com/PrairieLearn/PrairieLearn / pullAndVerifyFileInDev

Function pullAndVerifyFileInDev

tests/testFileEditor.js:787–803  ·  view source on GitHub ↗
(fileName, fileContents)

Source from the content-addressed store, hash-verified

785}
786
787function pullAndVerifyFileInDev(fileName, fileContents) {
788 describe(`pull in dev and verify contents of ${fileName}`, function() {
789 it('should pull', function(callback) {
790 const execOptions = {
791 cwd: courseDevDir,
792 env: process.env,
793 };
794 exec(`git pull`, execOptions, (err) => {
795 if (ERR(err, callback)) return;
796 callback(null);
797 });
798 });
799 it('should match contents', function() {
800 assert.strictEqual(fs.readFileSync(path.join(courseDevDir, fileName), 'utf-8'), fileContents);
801 });
802 });
803}
804
805function writeAndPushFileInDev(fileName, fileContents) {
806 describe(`write ${fileName} in courseDev and push to courseOrigin`, function() {

Callers 1

doEditsFunction · 0.85

Calls 2

itFunction · 0.85
callbackFunction · 0.85

Tested by

no test coverage detected