Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
81155 views
1
/**
2
* Copyright 2013-2014, Facebook, Inc.
3
* All rights reserved.
4
*
5
* This source code is licensed under the BSD-style license found in the
6
* LICENSE file in the root directory of this source tree. An additional grant
7
* of patent rights can be found in the PATENTS file in the same directory.
8
*
9
* @emails react-core
10
*/
11
12
"use strict";
13
14
describe('memoizeStringOnly', function() {
15
var memoizeStringOnly;
16
17
beforeEach(function() {
18
require('mock-modules').dumpCache();
19
memoizeStringOnly = require('memoizeStringOnly');
20
});
21
22
it('should be transparent to callers', function() {
23
var callback = function(string) {
24
return string;
25
};
26
var memoized = memoizeStringOnly(callback);
27
28
expect(memoized('foo'), callback('foo'));
29
});
30
});
31
32