<p dir="auto">source code <code class="notranslate">test.js</code> as below:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="function testable(target) {
  target.isTestable = true;
}

@testable
class MyTestableClass {}"><pre class="notranslate"><span class="pl-k">function</span> <span class="pl-en">testable</span><span class="pl-kos">(</span><span class="pl-s1">target</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-s1">target</span><span class="pl-kos">.</span><span class="pl-c1">isTestable</span> <span class="pl-c1">=</span> <span class="pl-c1">true</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

@<span class="pl-s1">testable</span>
<span class="pl-k">class</span> <span class="pl-v">MyTestableClass</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">and with <code class="notranslate">.babelrc</code></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;presets&quot;: [&quot;es2015&quot;, &quot;stage-0&quot;]
}"><pre class="notranslate">{
    <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>es2015<span class="pl-pds">"</span></span>, <span class="pl-s"><span class="pl-pds">"</span>stage-0<span class="pl-pds">"</span></span>]
}</pre></div>
<p dir="auto">When run babel, failed</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ babel test.js
TypeError: test.js: Property right of AssignmentExpression expected node to be of a type [&quot;Expression&quot;] but instead got &quot;Decorator&quot;
    at Object.validate (/Users/soulwu/test/node_modules/babel-types/lib/definitions/index.js:99:13)
    at validate (/Users/soulwu/test/node_modules/babel-types/lib/index.js:295:9)
    at Object.builder (/Users/soulwu/test/node_modules/babel-types/lib/index.js:248:7)
    at maybeMemoise (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:29:32)
    at memoiseDecorators (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:56:7)
    at Object.exports.default (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:61:3)
    at PluginPass.ClassDeclaration (/Users/soulwu/test/node_modules/babel-plugin-transform-decorators/lib/index.js:164:45)
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/visitors.js:271:19
    at NodePath._call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:72:18)
    at NodePath.call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:44:17)"><pre class="notranslate">$ babel test.js
TypeError: test.js: Property right of AssignmentExpression expected node to be of a <span class="pl-c1">type</span> [<span class="pl-s"><span class="pl-pds">"</span>Expression<span class="pl-pds">"</span></span>] but instead got <span class="pl-s"><span class="pl-pds">"</span>Decorator<span class="pl-pds">"</span></span>
    at Object.validate (/Users/soulwu/test/node_modules/babel-types/lib/definitions/index.js:99:13)
    at validate (/Users/soulwu/test/node_modules/babel-types/lib/index.js:295:9)
    at Object.builder (/Users/soulwu/test/node_modules/babel-types/lib/index.js:248:7)
    at maybeMemoise (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:29:32)
    at memoiseDecorators (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:56:7)
    at Object.exports.default (/Users/soulwu/test/node_modules/babel-helper-explode-class/lib/index.js:61:3)
    at PluginPass.ClassDeclaration (/Users/soulwu/test/node_modules/babel-plugin-transform-decorators/lib/index.js:164:45)
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/visitors.js:271:19
    at NodePath._call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:72:18)
    at NodePath.call (/usr/local/lib/node_modules/babel-cli/node_modules/babel-traverse/lib/path/context.js:44:17)</pre></div>
<p dir="auto">need help...</p>