aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mammoth.tests.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index 0c9519e..90b96e5 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -95,4 +95,15 @@ describe('mammoth', function() {
assert.deepEqual(result.messages, []);
});
});
+
+ test('using styleMapping throws error', function() {
+ try {
+ mammoth.styleMapping()
+ } catch (error) {
+ assert.equal(
+ error.message,
+ 'Use a raw string instead of mammoth.styleMapping e.g. "p[style-naming=\'Title\'] => h1" instead of mammoth.styleMapping("p[style-naming=\'Title\'] => h1")'
+ );
+ }
+ });
})