You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-04 05:02:41 +03:00
Fix logger imports in tests
This commit is contained in:
@@ -25,7 +25,7 @@ import sdk from '..';
|
||||
import testUtils from './test-utils';
|
||||
import MockHttpBackend from 'matrix-mock-request';
|
||||
import LocalStorageCryptoStore from '../lib/crypto/store/localStorage-crypto-store';
|
||||
import logger from '../src/logger';
|
||||
import logger from '../lib/logger';
|
||||
|
||||
/**
|
||||
* Wrapper for a MockStorageApi, MockHttpBackend and MatrixClient
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
|
||||
import TestClient from '../TestClient';
|
||||
import testUtils from '../test-utils';
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
const ROOM_ID = "!room:id";
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ const sdk = require("../..");
|
||||
const utils = require("../../lib/utils");
|
||||
const testUtils = require("../test-utils");
|
||||
const TestClient = require('../TestClient').default;
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
let aliTestClient;
|
||||
const roomId = "!room:localhost";
|
||||
|
||||
@@ -4,7 +4,7 @@ const sdk = require("../..");
|
||||
const HttpBackend = require("matrix-mock-request");
|
||||
const utils = require("../test-utils");
|
||||
const EventTimeline = sdk.EventTimeline;
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
const baseUrl = "http://localhost.or.something";
|
||||
const userId = "@alice:localhost";
|
||||
|
||||
@@ -21,7 +21,7 @@ const anotherjson = require('another-json');
|
||||
const utils = require('../../lib/utils');
|
||||
const testUtils = require('../test-utils');
|
||||
const TestClient = require('../TestClient').default;
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
const ROOM_ID = "!room:id";
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import logger from '../src/logger';
|
||||
import logger from '../lib/logger';
|
||||
|
||||
// try to load the olm library.
|
||||
try {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// load olm before the sdk if possible
|
||||
import './olm-loader';
|
||||
|
||||
import logger from '../src/logger';
|
||||
import logger from '../lib/logger';
|
||||
import sdk from '..';
|
||||
const MatrixEvent = sdk.MatrixEvent;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ limitations under the License.
|
||||
import DeviceList from '../../../lib/crypto/DeviceList';
|
||||
import MemoryCryptoStore from '../../../lib/crypto/store/memory-crypto-store.js';
|
||||
import utils from '../../../lib/utils';
|
||||
import logger from '../../../src/logger';
|
||||
import logger from '../../../lib/logger';
|
||||
|
||||
const signedDeviceList = {
|
||||
"failures": {},
|
||||
|
||||
@@ -7,7 +7,7 @@ import MockStorageApi from '../../../MockStorageApi';
|
||||
import testUtils from '../../../test-utils';
|
||||
import OlmDevice from '../../../../lib/crypto/OlmDevice';
|
||||
import Crypto from '../../../../lib/crypto';
|
||||
import logger from '../../../../src/logger';
|
||||
import logger from '../../../../lib/logger';
|
||||
|
||||
const MatrixEvent = sdk.MatrixEvent;
|
||||
const MegolmDecryption = algorithms.DECRYPTION_CLASSES['m.megolm.v1.aes-sha2'];
|
||||
|
||||
@@ -18,7 +18,7 @@ import '../../../olm-loader';
|
||||
|
||||
import MemoryCryptoStore from '../../../../lib/crypto/store/memory-crypto-store.js';
|
||||
import MockStorageApi from '../../../MockStorageApi';
|
||||
import logger from '../../../../src/logger';
|
||||
import logger from '../../../../lib/logger';
|
||||
|
||||
import OlmDevice from '../../../../lib/crypto/OlmDevice';
|
||||
import olmlib from '../../../../lib/crypto/olmlib';
|
||||
|
||||
@@ -25,7 +25,7 @@ import testUtils from '../../test-utils';
|
||||
|
||||
import OlmDevice from '../../../lib/crypto/OlmDevice';
|
||||
import Crypto from '../../../lib/crypto';
|
||||
import logger from '../../../src/logger';
|
||||
import logger from '../../../lib/logger';
|
||||
import olmlib from '../../../lib/crypto/olmlib';
|
||||
|
||||
const Olm = global.Olm;
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import logger from '../../../../src/logger';
|
||||
import logger from '../../../../lib/logger';
|
||||
|
||||
try {
|
||||
global.Olm = require('olm');
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import logger from '../../../../src/logger';
|
||||
import logger from '../../../../lib/logger';
|
||||
|
||||
try {
|
||||
global.Olm = require('olm');
|
||||
|
||||
@@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import logger from '../../../../src/logger';
|
||||
import logger from '../../../../lib/logger';
|
||||
|
||||
try {
|
||||
global.Olm = require('olm');
|
||||
|
||||
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
import sdk from '../..';
|
||||
const MatrixEvent = sdk.MatrixEvent;
|
||||
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
describe("MatrixEvent", () => {
|
||||
describe(".attemptDecryption", () => {
|
||||
|
||||
@@ -21,7 +21,7 @@ const sdk = require("../..");
|
||||
const InteractiveAuth = sdk.InteractiveAuth;
|
||||
const MatrixError = sdk.MatrixError;
|
||||
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
// Trivial client object to test interactive auth
|
||||
// (we do not need TestClient here)
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'source-map-support/register';
|
||||
const sdk = require("../..");
|
||||
const MatrixClient = sdk.MatrixClient;
|
||||
|
||||
import logger from '../../src/logger';
|
||||
import logger from '../../lib/logger';
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user