Remove FakeAsyncLocalStorage from GitHub (#37975)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/37975

AsyncLocalStorage is no longer distributed with react-native, so neither should this test mock be.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D46857153

fbshipit-source-id: 3fdb2d95f3185b85a0777fde6ce59165c8ace8e9
This commit is contained in:
Pieter De Baets
2023-06-20 08:53:03 -07:00
committed by Facebook GitHub Bot
parent 9f7dddf1ac
commit 9d4cacee53
@@ -1,56 +0,0 @@
/*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
package com.facebook.react.testing;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.BaseJavaModule;
import com.facebook.react.bridge.Callback;
import com.facebook.react.bridge.ReactMethod;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.WritableMap;
/** Dummy implementation of storage module, used for testing */
public final class FakeAsyncLocalStorage extends BaseJavaModule {
private static WritableMap errorMessage;
static {
errorMessage = Arguments.createMap();
errorMessage.putString("message", "Fake Async Local Storage");
}
@Override
public String getName() {
return "AsyncSQLiteDBStorage";
}
@ReactMethod
public void multiGet(final ReadableArray keys, final Callback callback) {
callback.invoke(errorMessage, null);
}
@ReactMethod
public void multiSet(final ReadableArray keyValueArray, final Callback callback) {
callback.invoke(errorMessage);
}
@ReactMethod
public void multiRemove(final ReadableArray keys, final Callback callback) {
callback.invoke(errorMessage);
}
@ReactMethod
public void clear(Callback callback) {
callback.invoke(errorMessage);
}
@ReactMethod
public void getAllKeys(final Callback callback) {
callback.invoke(errorMessage, null);
}
}