diff --git a/.eslintrc b/.eslintrc index 1a6ea977..770cb716 100644 --- a/.eslintrc +++ b/.eslintrc @@ -13,7 +13,7 @@ "flowtype" ], "env": { - "jest": true, + "mocha": true, "browser": true, "node": true, "es6": true diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..6094541f --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,27 @@ +### Environment + +1. `node -v`: [fill] +1. `npm -v`: [fill] +1. `npm ls officegen`: [fill] +1. Operating system: [fill] +1. Microsoft Office version: [fill] +1. Problem with Powerpoint, Excel or Word document: [fill] + +### Steps to Reproduce + + + +[fill] + +### Expected Behavior + +[fill] + +### Actual Behavior + +[fill] + +--- + +An example code will be the best. +The fastest (and the most fun) way to resolve the issue is to submit a pull-request yourself. diff --git a/tests/docx-header-footer.test.js b/tests/docx-header-footer.test.js index 2f5fd108..14d3ba4c 100644 --- a/tests/docx-header-footer.test.js +++ b/tests/docx-header-footer.test.js @@ -42,6 +42,15 @@ var onError = function (err) { describe('DOCX generator with header and footer', function () { this.timeout(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a document with header and footer', function (done) { var docx = officegen({ type: 'docx', diff --git a/tests/docx.test.js b/tests/docx.test.js index 729fe7e0..9db9daec 100644 --- a/tests/docx.test.js +++ b/tests/docx.test.js @@ -41,6 +41,15 @@ var onError = function (err) { describe('DOCX generator', function () { this.timeout(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a document with text and styles', function (done) { var docx = officegen('docx') docx.on('error', onError) diff --git a/tests/pptx-charts.test.js b/tests/pptx-charts.test.js index 0ff6e483..5d6fc99b 100644 --- a/tests/pptx-charts.test.js +++ b/tests/pptx-charts.test.js @@ -41,6 +41,15 @@ var onError = function (err) { describe('PPTX generator', function () { this.slow(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a slides with charts', function (done) { var pptx = officegen({ type: 'pptx', tempDir: outDir }) pptx.on('error', onError) diff --git a/tests/pptx-layouts.test.js b/tests/pptx-layouts.test.js index a3aab6e8..385b7983 100644 --- a/tests/pptx-layouts.test.js +++ b/tests/pptx-layouts.test.js @@ -42,6 +42,15 @@ var onError = function (err) { describe('PPTX Layouts plugin', function () { this.slow(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a presentation with the title layout', function (done) { var slide var pptx = officegen({ diff --git a/tests/pptx-speakernotes.test.js b/tests/pptx-speakernotes.test.js index 191cdbb6..bfc4eb10 100644 --- a/tests/pptx-speakernotes.test.js +++ b/tests/pptx-speakernotes.test.js @@ -40,6 +40,15 @@ var onError = function (err) { describe('PPTX Speaker Notes plugin', function () { this.slow(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a presentation with one speaker note', function (done) { var slide var pptx = officegen('pptx') diff --git a/tests/pptx.test.js b/tests/pptx.test.js index 89cfaac0..50bba1a5 100644 --- a/tests/pptx.test.js +++ b/tests/pptx.test.js @@ -40,6 +40,15 @@ var onError = function (err) { describe('PPTX generator', function () { this.slow(1000) + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a presentation with properties and text', function (done) { var pptx = officegen('pptx') pptx.on('error', onError) diff --git a/tests/xlsx-test.js b/tests/xlsx-test.js index 5b8830e9..ec92586a 100644 --- a/tests/xlsx-test.js +++ b/tests/xlsx-test.js @@ -38,6 +38,15 @@ var onError = function (err) { } describe('XLSX generator', function () { + before(function (done) { + fs.mkdir(outDir, 0o777, function (err) { + if (err) { + } // Endif. + + done() + }) + }) + it('creates a spreadsheet with text and numbers', function (done) { var xlsx = officegen('xlsx') xlsx.on('error', onError)