diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-04-27 18:12:33 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-04-27 18:12:33 +0100 |
| commit | 9b9fc902b784090f4f6fafd866c7b35bf47f517f (patch) | |
| tree | 7aee5aad173e8e7b42d344aa748d709d4e4dbf3a /tests | |
| parent | a8b849523b1ef72810309068835aa123573f9dd0 (diff) | |
Throw error if somebody tries to use styleMapping()
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mammoth.tests.js | 11 |
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")' + ); + } + }); }) |
